Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1484049

    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

    #1484056

    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

    #1484083

    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

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.