Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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 9 years, 8 months ago by sethbutler.
    #299419

    Hey 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!
    Josue

    #299509

    Hi 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!
    Seth

    #299511
    This reply has been marked as private.
    #300302

    Hey!

    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!
    Peter

    #300468

    Hi 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
    Seth

    P.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 9 years, 8 months ago by sethbutler.
    #300510

    Hi!

    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

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.