Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Fixing Display Bugs
Browse files Browse the repository at this point in the history
Office Location now displays.
File URL no longer triggers error.
  • Loading branch information
andrewmbacon committed Nov 2, 2015
1 parent d5909cb commit bd9ee30
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions inc/people-grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@
echo '</div>';
};
if (in_array('file', $information_to_display)) {
echo '<p class="person-file">';
$file = get_field('file');
//var_dump($thing);
echo '<a href="'.$file[url].'">'.$file[title].'</a>';
echo '</p>';
$file = get_field('file');
$urlLength = strlen($file);
if ($urlLength > 0){
echo '<p class="person-file">';
echo '<a href="'.$file[url].'">'.$file[title].'</a>';
echo '</p>';
}
};
if (in_array('email', $information_to_display)) {
echo '<p class="person-email">';
Expand All @@ -88,7 +90,7 @@
the_field('mailing_address');
echo '</p>';
};
if (in_array('office_location ', $information_to_display)) {
if (in_array('office_location', $information_to_display)) {
echo '<p class="person-office_location">';
the_field('office_location');
echo '</p>';
Expand Down

0 comments on commit bd9ee30

Please sign in to comment.