Hi guys,
In feb you recommended I use a Functionality plugin, which I installed and entered the following code:
add_filter(‘avia_post_nav_settings’,’avia_same_category_filter’, 10, 1);
function avia_same_category_filter($settings)
{
$settings[‘same_category’] = true;
return $settings;
}
This doesn’t seem to be working. Please can you have a look to make sure the code is correct?
Thanks,
Krissie
Hi Krissie!
Have you updated since you added the code and where did you add the code? Make sure you add the code to a child theme to not lose your customisations on updates.
Regards,
Rikard
Hi Rikard,
I was told by another guy that using the functions plugin would be fine rather than a child theme (which is not an option for me).
It doesn’t seem to be working though.
Hi!
Please add the code to Functions.php file of the theme in Appearance > Editor and check if that helps.
Cheers!
Yigit
Hey Yigit,
Hopefully you guys will add something into the template for stuff like this.
Which functions? The functions-enfold or theme functions?
Thanks, :) x
Hi Yigit,
But where do I actually put the code within the functions.php?
It doesn’t work when I do it.
Is this code right?
add_filter(‘avia_post_nav_settings’,’avia_same_category_filter’, 10, 1);
function avia_same_category_filter($settings)
{
$settings[‘same_category’] = true;
return $settings;
}