-
AuthorPosts
-
May 14, 2024 at 5:24 pm #1443453
Hi There,
If you go into a post there is a previous arrow on the left. I would prefer a next arrow on the right so instead of going backwards, you are going forwards.
Please can you assist? Let me know if you need more information.
Here is an example – https://constantiaglen.com/31st-may-2024-steak-and-three/
Kind regards,
CamillaMay 15, 2024 at 4:07 am #1443546Hey engage24,
Thank you for the inquiry.
You can reverse the post navigation using the following filter. The arrows will stay in the same position, but the sorting of the posts will be reversed.
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) { $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,
IsmaelMay 17, 2024 at 2:44 pm #1444075Hi Ismael,
Great thanks – That worked well.
If I keep clicking then I can see other posts in other categories. Is there a way to only show the specific category on those posts? If I keep clicking the arrow then I only want to see the posts in the winter winemakers dinner category not any other posts.
Kind regards,
CamillaMay 19, 2024 at 2:40 am #1444441Hi,
Try this filter insteadadd_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,
MikeMay 21, 2024 at 6:19 pm #1444976Hi Mike,
Thanks so much, that worked perfectly.
Kind regards,
CamillaMay 21, 2024 at 8:16 pm #1444992 -
AuthorPosts
- You must be logged in to reply to this topic.