Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #462388

    Hi,

    searched and tried some code in functions.php of child theme:

    
    add_filter ('avia_post_nav_categories', 'use_same_category_filter');
    function use_same_category_filter ($same_category) {
      $same_category = true;
      return $same_category;
    }
    

    It should restrict prev/next post buttons to the same category of current post.

    But the code doesn’t work.

    #462597

    Hi Carsten!

    Thank you for using Enfold.

    Please use this instead:

    add_filter( 'avia_post_nav_settings', 'enfold_customization_same_cat' );
    function enfold_customization_same_cat( $s ) {
    	$s['same_category'] = true;
    	return $s;
    }

    Cheers!
    Ismael

    #463012

    I found an old code, hm?

    Thank you. It works now.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Prev/Next post buttons same category’ is closed to new replies.