diff --git a/inc/people-grid.php b/inc/people-grid.php index 40278a1..5163dd0 100644 --- a/inc/people-grid.php +++ b/inc/people-grid.php @@ -54,6 +54,14 @@ if ( $the_query->have_posts() ) { ?> } echo '

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

'; + $departmentPieces = explode(";", get_field('department')); + foreach( $departmentPieces as $d ){ + echo ( !empty($d) ? "{$d}
": "" ); + } + echo '

'; + }; if (in_array('about', $information_to_display)) { echo '
'; the_field('about'); @@ -98,6 +106,11 @@ if ( $the_query->have_posts() ) { ?> the_field('office_location'); echo '

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

'; + the_field('campus'); + echo '

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

'; the_field('office_hours'); @@ -107,6 +120,9 @@ if ( $the_query->have_posts() ) { ?> echo '

'; the_field('courses'); echo '

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

'.get_field('url').'

'; }; ?>
diff --git a/inc/people-table.php b/inc/people-table.php index 06d84df..c936b76 100644 --- a/inc/people-table.php +++ b/inc/people-table.php @@ -90,6 +90,14 @@ if ( $the_query->have_posts() ) { } echo ''; } + if (in_array('department', $information_to_display)) { + echo ''; + $departmentPieces = explode(";", get_field('department')); + foreach( $departmentPieces as $d ){ + echo ( !empty($d) ? "{$d}
": "" ); + } + echo ''; + } createTextCell('about', 'about'); if (in_array('file', $information_to_display)) { echo ''; @@ -112,8 +120,14 @@ if ( $the_query->have_posts() ) { echo ''; } createTextCell('office_location', 'office_location'); + createTextCell('campus', 'campus'); createTextCell('office_hours', 'office_hours'); createTextCell('courses', 'courses'); + if (in_array('url', $information_to_display)) { + echo ''; + echo ''.get_field('url').''; + echo ''; + }; diff --git a/inc/person-info.php b/inc/person-info.php new file mode 100644 index 0000000..b41b402 --- /dev/null +++ b/inc/person-info.php @@ -0,0 +1,48 @@ + + Contact Information + '; + if ($field == 'file'){ + echo ''; + } else { + echo ''; + } + echo ''; + } + } + displayField('email'); + displayField('phone'); + displayField('phone_(alternate)'); + displayField('fax'); + displayField('file'); + displayField('mailing_address'); + displayField('office_location'); + displayField('campus'); + displayField('office_hours'); + displayField('courses'); + displayField('url'); + ?> +
'.get_field('filelabel').''.$field_label.''; + if ($field == 'email'){ + echo ''; + the_field($field); + echo ''; + } else if ($field == 'file'){ + $file = get_field($field); + $url= $file['url']; + echo ' '; + echo $file['title']; + echo ''; + } else if ($field == 'mailing_address'){ + echo str_replace(';','
',get_field('mailing_address')); + } else { + the_field($field); + } + echo '
\ No newline at end of file diff --git a/inc/person-no-about.php b/inc/person-no-about.php index 78d737a..7ec1704 100644 --- a/inc/person-no-about.php +++ b/inc/person-no-about.php @@ -21,46 +21,10 @@ foreach( $titlePieces as $t ){ echo ( !empty($t) ? '

'.$t.'

': '' ); } + $departmentPieces = explode(";", get_field('department')); + foreach( $departmentPieces as $d ){ + echo ( !empty($d) ? '

'.$d.'

': '' ); + } ?> - - Contact Information - '; - echo ''; - } - } - displayField('email'); - displayField('phone'); - displayField('phone_(alternate)'); - displayField('fax'); - displayField('file'); - displayField('mailing_address'); - displayField('office_location'); - displayField('office_hours'); - displayField('courses'); - ?> -
'.$field_label.''; - if ($field == 'email'){ - echo ''; - the_field($field); - echo ''; - } else if ($field == 'file'){ - $file = get_field($field); - $url= $file['url']; - echo ' '; - echo $file['title']; - echo ''; - } else if ($field == 'mailing_address'){ - echo str_replace(';','
',get_field('mailing_address')); - } else { - the_field($field); - } - echo '
+ diff --git a/inc/person-with-about.php b/inc/person-with-about.php index 1c87360..824aea5 100644 --- a/inc/person-with-about.php +++ b/inc/person-with-about.php @@ -14,6 +14,10 @@ foreach( $titlePieces as $t ){ echo ( !empty($t) ? '

'.$t.'

': '' ); } + $departmentPieces = explode(";", get_field('department')); + foreach( $departmentPieces as $d ){ + echo ( !empty($d) ? '

'.$d.'

': '' ); + } ?>
@@ -25,46 +29,6 @@ echo ''; };?>
- - Contact Information - '; - echo ''; - } - } - displayField('email'); - displayField('phone'); - displayField('phone_(alternate)'); - displayField('fax'); - displayField('file'); - displayField('mailing_address'); - displayField('office_location'); - displayField('office_hours'); - displayField('courses'); - ?> -
'.$field_label.''; - if ($field == 'email'){ - echo ''; - the_field($field); - echo ''; - } else if ($field == 'file'){ - $file = get_field($field); - $url= $file['url']; - echo ' '; - echo $file['title']; - echo ''; - } else if ($field == 'mailing_address'){ - echo str_replace(';','
',get_field('mailing_address')); - } else { - the_field($field); - } - echo '
+
\ No newline at end of file diff --git a/single-person.php b/single-person.php index aefe8cc..d11fc36 100644 --- a/single-person.php +++ b/single-person.php @@ -1,33 +1,33 @@ - - -
- - -
-
-
-
-
- 0){ - include('inc/person-with-about.php'); - } else { - include('inc/person-no-about.php'); - } - ?> -
-
-
-
- -
- - -
- + + +
+ + +
+
+
+
+
+ 0){ + include('inc/person-with-about.php'); + } else { + include('inc/person-no-about.php'); + } + ?> +
+
+
+
+ +
+ + +
+