Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #711416

    Hi

    On a single post the next and previous post are not accurate because they are displaying post coming from all categories.

    I looked a your function: function avia_post_nav() in functions-enfold.php and see that $same_category is set to false, but why?
    If i turn it to on, it works.
    So as I do not want to modfiy Enfold core files, I just wonder if there is a hook to set it to on?

    I also notice that the order is wrong, or reverse or not natural (I read that https://kriesi.at/support/topic/prevnext-portfolio-goes-in-reverse/) and I have the same question : how to hook that without modify any Enfold core files?

    > I do not want to modify functions-enfold.php at eceh Enfold updates… :-(

    Thanks

    #712013

    Hey!

    Please use a child theme – http://kriesi.at/documentation/enfold/using-a-child-theme/ and add following code to Functions.php file of your child theme

    add_filter( 'avia_post_nav_entries', 'enfold_customization_postnav', 10, 2); 
    function enfold_customization_postnav($entries, $settings) {
        $entries['next'] = get_next_post($settings['same_category']);
        $entries['prev'] = get_previous_post($settings['same_category']);
        return $entries;
    }

    Best regards,
    Yigit

    #712026

    Thanks Yigit I’ll try but you do not answer my first question:
    > Why $same_category is set to false?

    thanks

    #712030

    Hi!

    You are welcome!
    We believe that would be more useful for users who does not have many items, so their post navigation would be so limited. You can request a change here – https://kriesi.at/support/enfold-feature-requests/. However, the code i posted above should work just fine :)

    Best regards,
    Yigit

    #712063

    This, works better for what I need:

    add_filter( 'avia_post_nav_entries', 'enfold_customization_postnav', 10, 2); 
    function enfold_customization_postnav($entries, $settings) {
        $entries['next'] = get_previous_post(true, $settings['excluded_terms'], $settings['taxonomy']);
        $entries['prev'] = get_next_post(true, $settings['excluded_terms'], $settings['taxonomy']);
        return $entries;
    }

    Thanks

    I do not have time to post a request but it should make sens if this could be in Enfold Panel options (like many others stuff like those bads Hn Title tags everywhere in the code that are not good for SEO semantics > they should be simple P tags ;-)

    #712065

    Hi!

    Great! Glad it is working fine :)

    Sorry but i am afraid, i am going to need to ask you to request the changes here – https://kriesi.at/support/enfold-feature-requests/ again. Kriesi created request form to track requests more in depth and more accurately :)

    Regards,
    Yigit

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