diff --git a/inc/people-grid.php b/inc/people-grid.php index 23ce530..6093e50 100644 --- a/inc/people-grid.php +++ b/inc/people-grid.php @@ -2,32 +2,32 @@ $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) { ?>
- have_posts() ) { $the_query->the_post(); - - + + ?> - - - - - - - + + + + + + +
- '; - + if (in_array('photo', $information_to_display)) { echo '
'; the_post_thumbnail('large'); echo '
'; }; - + if (in_array('first_name', $information_to_display) || in_array('middle_name', $information_to_display) || in_array('last_name', $information_to_display)){ echo '

'; if (in_array('first_name', $information_to_display)) { @@ -42,14 +42,17 @@ the_field('last_name'); }; echo '

'; - }; - + }; + echo ''; - + if (in_array('title', $information_to_display)) { - echo '

'; - the_field('title'); - echo '

'; + echo '

'; + $titlePieces = explode(";", get_field('title')); + foreach( $titlePieces as $t ){ + echo ( !empty($t) ? "{$t}
": "" ); + } + echo '

'; }; if (in_array('about', $information_to_display)) { echo '
'; @@ -63,7 +66,7 @@ echo '

'; echo ''.$file[title].''; echo '

'; - } + } }; if (in_array('email', $information_to_display)) { echo '

'; @@ -107,18 +110,17 @@ }; ?>

- -
'; + // if this is the 4th, 8th, 16th, etc person... + echo '
'; } - $person_count++; + $person_count++; } //end of posts?>
- - \ No newline at end of file diff --git a/inc/people-table.php b/inc/people-table.php index c7b1068..2aab3c2 100644 --- a/inc/people-table.php +++ b/inc/people-table.php @@ -1,18 +1,18 @@ have_posts() ) { - - // how many columns? Based on what they chose to display. - + + // how many columns? Based on what they chose to display. + $num_cols = count($information_to_display); //var_dump($num_cols); - + ?> List of People - - have_posts() ) { $the_query->the_post(); - - /* - create a row. - - For each possible field. - - Check to see if it's within the $information_to_display array. - + + /* + create a row. + + For each possible field. + + Check to see if it's within the $information_to_display array. + If it is, create a '; - + if (in_array('photo', $information_to_display)) { echo ''; } - createTextCell('title', 'title'); + //createTextCell('title', 'title'); + if (in_array('title', $information_to_display)) { + echo ''; + } createTextCell('about', 'about'); if (in_array('file', $information_to_display)) { echo ''; - - - + + + } //end of posts?>
- - IF any values are found to match, dump those out. - - After all possible fields, close the row. - + + IF any values are found to match, dump those out. + + After all possible fields, close the row. + */ - - - - + + + + echo '
'; the_post_thumbnail(array('65', '65')); @@ -81,7 +81,15 @@ }; echo ''; + $titlePieces = explode(";", get_field('title')); + foreach( $titlePieces as $t ){ + echo ( !empty($t) ? "{$t}
": "" ); + } + echo '
'; @@ -101,18 +109,18 @@ createTextCell('office_location', 'office_location'); createTextCell('office_hours', 'office_hours'); createTextCell('courses', 'courses'); - - + + echo '
- - \ No newline at end of file