Okay
  Public Ticket #1569919
Blog Prev & Next
Closed

Comments

  •  20
    Zoe started the conversation

    Hi,

    I contacted you a month or so ago about this and Arlind was out...We noticed that the blog prev and next now goes circular and we wish it didn't.

    We liked the old way where when you come to the end either the newest or oldest, that the next or prev option was grayed out.

    Is there a way we can return to this? We have a developer so if you could give some hints I can have him do the code...

    Thank you as always for your help! Zoe

  • [deleted] replied

    Hi Zoe,

    Sure you can do that, simply add the following code in functions.php and the "prev next loop" will be disabled:

    add_filter( 'kalium_blog_single_post_prev_next_navigation', kalium_hook_merge_array_value( false, 'loop' ) );

    So this will disable looping. I hope it will work fine for you.

  •  20
    Zoe replied

    Oooh, I'm so excited to make this work!

    I tried pasting it into the functions.php file through the Wordpress admin editor and got this:

    Uncaught Error: Call to undefined function kalium_hook_merge_array_value() in wp-content/themes/kalium/functions.php:63
    Stack trace:
    #0 wp-settings.php(426): include()
    #1 wp-config.php(90): require_once('/www/brazibites...')
    #2 wp-load.php(37): require_once('/www/brazibites...')
    #3 wp-admin/admin.php(31): require_once('/www/brazibites...')
    #4 wp-admin/theme-editor.php(10): require_once('/www/brazibites...')
    #5 {main}  thrown

    I also had my developer add it to the backend and he got a 500 error. Can you think what might be going wrong?


    Thank You! Zoe

  •  20
    Zoe replied

    My developer say the problem is that:

    "the issue is that the function `kalium_hook_merge_array_value` that that code references doesn’t exist."

  • [deleted] replied

    Hi Zoe,

    I thought you were using most recent version of Kalium, here is another alternative of the previous code that I gave you:

    function blog_next_prev_nav_disable_loop( $args ) {
        $args['loop'] = false;
        return $args;
    }
    add_filter( 'kalium_blog_single_post_prev_next_navigation', 'blog_next_prev_nav_disable_loop' );

    This should work for you.