Hi. I would like the side links on my portfolio entries to link to the next or previous entries only within the same category.
You’ll see I have 2 galleries set up. One is residential and one is commercial.
When you go to a portfolio entry in residential the next and previous should only link to portfolio items within the residential category.
Please let me know how to go about this.
Thanks!
Hey epkdesign,
Thank you for the inquiry.
Do the portfolio entries share the same category aside from commercial or residential? If they do, sorting by category will not be possible since they are all grouped under the same category. If that’s not the case, you can use the following filter in the functions.php file.
add_filter( 'avf_post_nav_settings', 'avf_post_nav_settings_mod', 10, 1);
function avf_post_nav_settings_mod($settings)
{
$settings['same_category'] = true;
return $settings;
}
Best regards,
Ismael
Thank you so much. This worked perfectly!
Hi,
Thanks for the update, we’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.
Best regards,
Rikard