Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1312691

    Hello,
    the next portfolio link seems to sort portfolio items by date published.
    I want it to be sorted by portoflio raster setting.
    Change sort-order settings in portfolio raster – does not have any effect.

    clicking next item does not show expected portolio entry.

    Can you help.
    Best regards
    Michael

    • This topic was modified 3 years, 4 months ago by boschi.
    #1313801

    Hey Michael,

    Thank you for the inquiry.

    The post navigation displays or returns the adjacent posts, based on the date that they were published. It is not based on the order of the posts in the portfolio grid. We could set it so that it displays the posts based on their title or sort them alphabetically, but we cannot guarantee that it will return posts based on where they are positioned in the grid.

    You can add this filter in the functions.php file.

    function avf_get_prev_post_sort_mod( $sort ) {
    	return "ORDER BY p.post_title DESC LIMIT 1";
    }
    add_filter( 'get_previous_post_sort', 'avf_get_prev_post_sort_mod' );
    
    function avf_get_next_post_sort_mod( $sort ) {
    	return "ORDER BY p.post_title ASC LIMIT 1";
    }
    add_filter( 'get_next_post_sort', 'avf_get_next_post_sort_mod' );
    

    Unfortunately, we cannot set the navigation to display posts based on grid order or sorting.

    Best regards,
    Ismael

    #1313860

    Thank you Ismael
    Regards
    Michael

    #1314139

    Hi,

    Thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1314295

    Thanks, yes you can close the topic.
    Best regards,
    Michael

    #1314519

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Next porfolio item link – wrong sorting’ is closed to new replies.