Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1130258

    Hey at all,

    I wanted to limit the navigation of posts to the same category and therefore added the following code to my child theme:

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

    Unfortunately it doesn’t work, instead of that I get a code line on the front end side. Something seems to be wrong with the header.
    Can you please help me?

    EDIT: I deleted the code because it massively destroyed the complete site, but I don’t know, what is causing the problem.

    Best regards,
    Hella

    • This topic was modified 5 years, 3 months ago by come_paglia.
    #1130813

    Hey Hella,

    Thank you for using Enfold.

    The “avia_post_nav_settings” filter has been removed, so you have to replace it with the new “avf_post_nav_settings” filter.

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

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.