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
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
Thank you Ismael
Regards
Michael
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
Thanks, yes you can close the topic.
Best regards,
Michael
Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon