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
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