Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.ww.wp.xz.cn/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.ww.wp.xz.cn/reference/classes/wp_post/#comment-1971

    • This reply was modified 6 years, 1 month 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.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘error in backend’ is closed to new replies.