Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1045810

    All entires in the portfolio grid have navigational arrows to go to the next portfolio page, but they run backwards.

    On another installation I had added this to the child themes functions php to solve this:

    add_filter( ‘avia_post_nav_entries’, ‘enfold_customization_postnav’, 10, 2);
    function enfold_customization_postnav($entries, $settings)
    {
    if($settings[‘type’] == ‘portfolio’)
    {
    $settings[‘same_category’] = true;

    $entries[‘prev’] = get_previous_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
    $entries[‘next’] = get_next_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
    }

    return $entries;
    }

    Same type of installation it worked elsewhere but not in this case on this new installation. How can I correct this?

    Thanks so much.

    #1045927

    Hey tonyiatridis,

    The code above only says the nav to remain in the same category, it does not affect the sort order.

    Your solution should be something like this
    https://kriesi.at/support/topic/portfolio-order-reversed/#post-400533

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1094911

    the filter name has changed on 4.5.6 ( avia – is deprected ):

    add_filter( 'avf_post_nav_entries', 'enfold_change_direction_postnav', 10, 2); 
    function enfold_change_direction_postnav($entries, $settings) {
        $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;
    }

    if you like it only for portfolio you can edit your code above with the new filter name.

    #1095069
    #1095443

    Hi tonyiatridis,

    Did you get it working?


    @Guenni007
    thank you for your input.

    Best regards,
    Victoria

    #1095557

    Ironically, we decided to set the portfolio grid to load randomly as it’s a selection of authors and as the site grows we don’t want certain authors to always be on page 2 of the grid. However, I believe I had the same issue on another Enfold installation, and I’ll check there and follow up. Thanks for the help.

    #1096018

    Hi,

    Thanks for the update, we’ll keep the thread open for you in case you should need any further help.

    Best regards,
    Rikard

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