Tagged: post nav
Hey guys,
I use portfolio entries to display some bios on my website. The order perfectly follows the taxonomy I have customized for it when it displays the portfolio grid, but on the individual entry pages the prev and next navigation on the sides of the screen are in the opposite order. How can I change the order to follow the desired order as seen in the grid? I assume I have to change an “ascending” to a “descending” setting or vise-versa?
Here’s where the grid is displayed with the correct order: http://www.understandchristianity.com/bible-bios/
Here’s an example of a portfolio page where the post nav order is backward: http://www.understandchristianity.com/bible/bible-bios-jacob/
Thanks!
Brock
Hey understandchristianity!
Thank you for using Enfold.
You can add this to the functions.php to reverse the post navigation:
add_filter( 'avia_post_nav_entries', 'enfold_customization_postnav', 10, 2);
function enfold_customization_postnav($entries, $settings) {
$entries['prev'] = get_next_post($settings['same_category']);
$entries['next'] = get_previous_post($settings['same_category']);
return $entries;
}
Cheers!
Ismael
Thanks! It worked!