Hello,
I have made a portfolio website with several categories.
The problem is that when I’ve made a selection for a categorie, in the single item (portfolio item) mode I can go through all my portfolio items.
I just want to go to the selected categorie. Does anyone have a solution for this.
Thank you for your help.
Hendrik-Jan
Hey Wansink,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
Login credentials include:
Best regards,
Nikko
Hey Nikko,
Be my guest!
Do you want the language set on english?
Hendrik-Jan
Hi,
Thanks for your patience in waiting, I have added this code in functions.php of your child theme:
add_filter('avia_post_nav_settings','avia_same_category_filter', 10, 1);
function avia_same_category_filter($settings)
{
$settings['same_category'] = true;
return $settings;
}
Let us know if it works on your end too:)
Best regards,
Nikko
Thank you, this is the right solution!
Thank you very much!
Can you help me to explain the number 10, 1 in the code.
Maybe I need this code with an other website.
With regards, Hendrik-Jan
Hey!
10 is the priority, in which functions run in order, the lower number gets executed first, 1 is the number of accepted arguments in the function. You can refer here for more info: https://developer.wordpress.org/reference/functions/add_filter/
Hope this helps :)
Regards,
Nikko