From 92475a3dd687a4f1e82b0bfc488b2ea4cb3ea1f1 Mon Sep 17 00:00:00 2001 From: azett Date: Sat, 18 Jun 2022 11:45:01 +0200 Subject: [PATCH] Fixed #95: Error at prev link on first / next link on last entry. --- fp-includes/core/core.wp-pluggable-funcs.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fp-includes/core/core.wp-pluggable-funcs.php b/fp-includes/core/core.wp-pluggable-funcs.php index 1e1957e..815e020 100755 --- a/fp-includes/core/core.wp-pluggable-funcs.php +++ b/fp-includes/core/core.wp-pluggable-funcs.php @@ -46,7 +46,8 @@ if (!function_exists('get_nextpage_link')) : $a = _get_nextprev_link('NextPage'); - if ($q->single) { + // show next entry link only if there actually is a next entry - and only if one single entry is displayed + if (isset($a) && $q->single) { $a [0] .= ' » '; } @@ -62,7 +63,8 @@ if (!function_exists('get_prevpage_link')) : $a = _get_nextprev_link('PrevPage'); - if ($q->single) { + // show previous entry link only if there actually is a previous entry - and only if one single entry is displayed + if (isset($a) && $q->single) { $a [0] = ' « ' . $a [0]; }