![Check out Enfold](https://kriesi.at/wp-content/themes/kriesi/images/banner-enfold.jpg)
Tagged: avia post nav, enfold
-
AuthorPosts
-
August 3, 2014 at 8:48 pm #299410
Hello,
First off, kudos on the new features in the latest releases of Enfold—this theme is a real beauty to work with over time since it just keeps getting better!
Is there any way to modify the functions.php in enfold to allow for the previous/next buttons in the Avia Post Nav to sort through a single parent category (or taxonomy) and allow for a continuous click-through order like so (for instance, if you only had three posts in the category):
-
first post
second post
third post
first post
second post
third post
first post
second post
third post
etc.Looking forward to your input!
Cheers
Seth-
This topic was modified 10 years, 1 month ago by
sethbutler.
August 3, 2014 at 9:06 pm #299419Hey Seth!
Try adding this at the very end of your theme functions.php file:
add_filter('avia_post_nav_categories', 'use_same_category_filter'); function use_same_category_filter($same_category) { $same_category = true; return $same_category; }
Cheers!
JosueAugust 4, 2014 at 6:57 am #299509Hi Josue,
Thank you for the quick response!
I added the code (and cleared my cache), but for some reason it looks like the navigation still bounces back and forth between second to last & last post in the category when I test it and click through all the way in either direction.
I’ll send a link to the dev site in a separate private message…
Thank You for looking into this!
SethAugust 4, 2014 at 6:58 am #299511This reply has been marked as private.August 5, 2014 at 4:41 pm #300302Hey!
Do you use the Post types order plugin: https://wordpress.org/plugins/post-types-order/ ? If yes this is a known issue because the plugin breaks the default wordpress functions next_post_link() and previous_post_link(). Try to deactivate the plugin and check if the next/prev buttons start to work properly.
Cheers!
PeterAugust 6, 2014 at 3:02 am #300468Hi Peter,
Thanks so much for the suggest on that one! It looks like that did the trick to resolve bouncing back and forth!
I was able to substitute the “Simple Custom Post Order” plugin to address re-ordering and that seems to play just fine with the theme: https://wordpress.org/plugins/simple-custom-post-order/
Do you know of any theme-friendly php query that we could add in to create a continuous click-through from last-post to first-post and so-on so that the post nav functions somewhat similar to a carousel?
Cheers
SethP.S. Below is what we’re running at the moment at the end of functions.php
add_filter('avia_post_nav_categories', 'use_same_category_filter'); function use_same_category_filter($same_category) { $same_category = true; return $same_category; } add_filter('avia_post_nav_entries', 'avia_apply_custom_sort_order_to_post_nav', 10, 2); function avia_apply_custom_sort_order_to_post_nav($entries, $settings) { $temp_prev = $entries['prev']; $temp_next = $entries['next']; $entries['prev'] = $entries['next'] = ""; if(!empty($temp_next)) $entries['prev'] = $temp_next; if(!empty($temp_prev)) $entries['next'] = $temp_prev; return $entries; }
-
This reply was modified 10 years, 1 month ago by
sethbutler.
August 6, 2014 at 5:45 am #300510Hi!
Thank you for the update.
Unfortunately, this is not possible without major customization.You might need to hire a freelance developer to add the feature for you. Please visit Envato Studio or Werkpress for further customization. You can also vote or post the feature on our Feature Requests page.
If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries. Thank you for your understanding.
Regards,
Ismael -
This topic was modified 10 years, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.