Hi Guys,
It looks like the order of my portfolios are reversed when using the left/right tabs on a portfolio item.
Any help on that?
Thanks in advance,
Cedric
Hey eldrico,
Thank you for the inquiry.
You can use this filter in the functions.php file to reverse the order of the items in the post nav.
add_filter( 'avf_post_nav_entries', 'avf_post_nav_entries_mod_reverse', 10, 3);
function avf_post_nav_entries_mod_reverse($entries, $settings, $queried_entries)
{
$settings['same_category'] = true;
$entries['prev'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
$entries['next'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
return $entries;
}
Best regards,
Ismael
Hi Ismael,
Thanks a lot for being so quick. Sorry, it’s working great but only for the portfolios.
In the e-shop side, the left-right (previous/next) button disappeared when I added the custom code and they come back when I disable the code.
Thanks for your help,
Cedric
Hi,
Thank you for the update. What happens when you remove this line?
$settings['same_category'] = true;
Best regards,
Ismael
Well, it’s working like a charm! Perfect Ismael,
Thanks for such a quick and efficient support!
Really appreciate, have a nice day,
Hi,
Glad Ismael could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike