Okay
  Public Ticket #2735120
next - prev navigation reverse
Closed

Comments

  •  3
    Maikel Thijssen started the conversation

    Hello,

    Can you tell me why the order on the single pages go backwards?

    I want thuis order on the homepage but I want the second picture and arrow go to the right in stead of left/bvack?

  • [deleted] replied

    Hi Maikel,

    That is the default behavior of WordPress and we just use the logic that WordPress serves.

    Thanks!

  •  3
    Maikel Thijssen replied

    How can I change this?

    Do I manualy have to change the order of all pictures?

    I know for sure that is was fine a couple of months ago, but now it has changed...

  • [deleted] replied

    Hi Maikel,

    On our old theme versions it was the way you are saying but we have changed that behavior because a lot of users wanted the default one that WordPress offers. You can see that other WordPress themes have the same logic too.

    Anyway, If you want to reverse their order, then:

    Please go to Appearance > Editor > and make sure that Theme Functions (functions.php) file is selected.

    Then at the end of the current codes please add this PHP code:

    add_filter( 'kalium_adjacent_post_link_args', function ( $args ) {
       $args['prev'] = ! $args['prev'];
       $args['next'] = ! $args['prev'];
       return $args;
    } );

    Have a nice day!

  •  3
    Maikel Thijssen replied

    Bam!

    It works!

    Thanks have a nice day!

  • [deleted] replied

    Happy to hear thatsmile.png

    Have a nice day!

    I will set this ticket as solved from here.