Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #478171

    Hi There, i wanted to have the Avia Post Nav i.e. “Next” and “Previous” in such a way that they work only for specific category they are in and on the last and first post, they don’t show option beyond the category they are in. I searched and found that we need to change the SAME CATEGORY variable to TRUE ($same_category = true;). I found this reference at https://kriesi.at/support/topic/avia-post-nav-with-the-same-category/

    However, i don’t want to make change in the core function file because it will get overwritten whenever i will update the ENFOLD. Can you suggest how i should do it in a child theme or any other way to make this happen. I will look forward for your suggestions.

    Vinay

    #478511

    Hi Vinay!

    If you’re not using a Child Theme you can use this plugin to store those custom functions apart from the core theme files:
    https://wordpress.org/plugins/functionality/

    Best regards,
    Josue

    #478548

    Thanks. I shall try that plugin.

    However, i was wondering how to do it with Child theme. We tried but the solution in the above url seems not to be working using child theme. thoughts?

    Vinay

    #478687

    Hey Vinay!

    If you are using a child theme simply pasting the code should work:

    add_filter('avia_post_nav_categories', 'use_same_category_filter');
    function use_same_category_filter($same_category)
    {
    $same_category = true;
    return $same_category;
    }

    Best regards,
    Josue

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