From 62e3d75b7130a6f9837a4a75a9dbece987fcdb5a Mon Sep 17 00:00:00 2001 From: vnmedeiros Date: Wed, 22 Jul 2020 10:50:41 -0300 Subject: [PATCH] add test if navigation is at the end or start of the list --- .../single-items-navigation.php | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/template-parts/single-items-navigation.php b/src/template-parts/single-items-navigation.php index 31a127c..156b6b1 100644 --- a/src/template-parts/single-items-navigation.php +++ b/src/template-parts/single-items-navigation.php @@ -1,15 +1,18 @@   ' . $previous_title . ''; - $next = ''; + $previous = $previous_link_url === false ? '' : ''; + $next = $next_link_url === false ? '' :''; break; case 'thumbnail_small': @@ -46,12 +49,12 @@ } // Creates the links - $previous = + $previous = $previous_link_url === false ? '' : ''; - $next = + $next = $next_link_url === false ? '' : ''; - $next = + $next = $next_link_url === false ? '' : '