Thread Starter
ne1s0n
(@ne1s0n)
I digged a bit and found the error source. In wp-next-post-navi.php on lines 42 49 and 58 you directly use $next_post->sub as in:
$next_navigation = $next_post->sub=""?'':'Next Post Coming Soon...▶';
This does not work for many reasons:
1) $next_post can be null, as per get_next_post() documentation: https://developer.wordpress.org/reference/functions/get_next_post/
2) you forgot a ! and so you are assigning a value
3) you should not use the fields of the $next_post object directly, since you are in the loop (with the exception of post id, that you can use). You should instead run the filters, as per this comment:
https://developer.wordpress.org/reference/classes/wp_post/#comment-1971
-
This reply was modified 5 years, 12 months ago by
ne1s0n.
Plugin Author
kharim
(@kharim)
I am sorry for the errors.
I have updated the plugin. Please update and let me know if it’s working well now.
Thanks.
Plugin Author
kharim
(@kharim)
I have released version 1.8.1 of the plugin with some fixes. Please tell me if it works well for you.