From bd9ee30cb7a09d25ee1bdbc820597aaf6e778a06 Mon Sep 17 00:00:00 2001 From: andrewmbacon Date: Mon, 2 Nov 2015 16:07:36 -0500 Subject: [PATCH] Fixing Display Bugs Office Location now displays. File URL no longer triggers error. --- inc/people-grid.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/inc/people-grid.php b/inc/people-grid.php index c8252a6..23ce530 100644 --- a/inc/people-grid.php +++ b/inc/people-grid.php @@ -57,11 +57,13 @@ echo ''; }; if (in_array('file', $information_to_display)) { - echo '

'; - $file = get_field('file'); - //var_dump($thing); - echo ''.$file[title].''; - echo '

'; + $file = get_field('file'); + $urlLength = strlen($file); + if ($urlLength > 0){ + echo '

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

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

'; @@ -88,7 +90,7 @@ the_field('mailing_address'); echo '

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

'; the_field('office_location'); echo '

';