Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #416369

    Hi guys,

    In feb you recommended I use a Functionality plugin, which I installed and entered the following code:

    add_filter(‘avia_post_nav_settings’,’avia_same_category_filter’, 10, 1);
    function avia_same_category_filter($settings)
    {
    $settings[‘same_category’] = true;
    return $settings;
    }

    This doesn’t seem to be working. Please can you have a look to make sure the code is correct?

    Thanks,

    Krissie

    #416923

    Hi Krissie!

    Have you updated since you added the code and where did you add the code? Make sure you add the code to a child theme to not lose your customisations on updates.

    Regards,
    Rikard

    #418181

    Hi Rikard,

    I was told by another guy that using the functions plugin would be fine rather than a child theme (which is not an option for me).
    It doesn’t seem to be working though.

    #419028

    Hi!

    Please add the code to Functions.php file of the theme in Appearance > Editor and check if that helps.

    Cheers!
    Yigit

    #421258

    Hey Yigit,

    Hopefully you guys will add something into the template for stuff like this.

    Which functions? The functions-enfold or theme functions?

    Thanks, :) x

    #421271

    Hey!

    functions.php file not functions-enfold.php :)

    Cheers!
    Yigit

    #425405

    Hi Yigit,

    But where do I actually put the code within the functions.php?
    It doesn’t work when I do it.

    Is this code right?

    add_filter(‘avia_post_nav_settings’,’avia_same_category_filter’, 10, 1);
    function avia_same_category_filter($settings)
    {
    $settings[‘same_category’] = true;
    return $settings;
    }

    #425714

    Hey!

    Add it to the very bottom of functions.php, did you try to empty you browser cache and reload a few times after adding it?

    Regards,
    Rikard

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