Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #891798

    Hi there,
    I am using a child theme of Enfold and I am trying to enable “show previous” and “show next” arrows/buttons on my single post pages. However, I can’t find how to enable this feature. I’ve read in older support threads that this should be enabled by default, but they are not showing up on my posts. I’ve read other threads that give options for customizing, but not how to enable it in the first place. Help please?

    #891812

    do you have more than one post ?
    do you use on top a slider ( full-width ) alb element?
    on that last case – it is not there because slider navigation should not be disturbed by post navigation prev/next
    – but you can reactivate it by this snippet in your functions.php of your child-theme:

    add_filter('avia_post_nav_settings','avia_remove_fullwidth_slider_check', 10, 1);
    function avia_remove_fullwidth_slider_check($settings){
      $settings['is_fullwidth'] = false;
      return $settings;
    }
    #891885

    Hi,
    When I view your single blog entries I see the previous and next navagation.
    please see screenshot in Private Content area

    Best regards,
    Mike

    #1039765

    Hi there,
    can I ask if it is posible enable the arrows on a specific category only? I have been looking for hours but cannot find a solution.

    I have put below css on general styling as i want to hide them as default:

    /*Disable previous and next post arrows on posts*/
    #top .avia-post-nav { display: none; }

    …as I am using many post categories with masonry galleries….

    but now want to enable them just on one category (latest news).
    Can you please assist?

    Thank you,
    Vasilis

    #1039984

    Hi,
    If I understand correctly, the arrows are showing by default and you would like to hide them for all categories except one?
    We could hide the arrows from certain categories by first adding the category class to the body tag, with adding this code to the end of your functions.php file in Appearance > Editor:

    // add category class on single post page
    add_filter( 'body_class', 'add_category_class' );
    function add_category_class( $classes ) {
        if( is_single() && has_category('news') ) $classes[] = 'news-cat';
        return $classes;
    }

    Then adding the category class to the css like this:

    #top.news-cat .avia-post-nav { display: none !important;  }

    This hides the arrows on the one category, and you could add more category classes to the rule, or you could use the “:not()” to hide the arrows for all classes except one, like this:

    #top:not(.news-cat) .avia-post-nav { display: none !important;  }

    Best regards,
    Mike

    #1040224

    Hi Mike,
    I had found on another thread this code below which hides the arrows on all posts and this is what I have alreaded added:

    /*Disable previous and next post arrows on posts*/
    #top .avia-post-nav { display: none; }

    Now, the post category for news, I have renamed the name in Greek Τελευταία Νέα and the slug shows newsbut changed it now to news-cat -like your code – did I do right?
    First question is if it will recognise the greek naming and secondly i if did corect adding your first code on functions.php and then i added the second code in general styling

    #top.news-cat .avia-post-nav { display: none !important; }?

    I do not see any change when I refresh the page. I do not know a lot of css code and go with what you I read on threads.

    Thank you!

    #1040719

    I am also trying to find any simple code like https://codex.wordpress.org/Function_Reference/previous_posts_link but get more confused on how to use it.

    #1041209

    Hi,
    The code from the WordPress Codex will not work for you “as-is”
    Can you please include a admin login in the private content area so we can assist. If I understand correctly you would only like the category “news” to show the arrows?
    Also please include a link to the page you are checking this with.

    If you added the first code correctly to the functions.php then your code in your css may not be correct, my use of news-cat was an example from my install, your actual category name may be different and I will need to see the page to determine the actual name.

    Best regards,
    Mike

    #1044021

    Hi MIke,
    I even renamed the category news-cat and pasted your code but nothing happened,
    I will give you temporary login details in private area.

    Thank you,
    Vasilis

    #1044090

    Hi,
    Thank you for the login, first I changed your category from “news-cat” to “news”, so the function I posted will work correctly. So now all of your posts in the category news has the page class “news-cat”
    Then I added this css to only show the arrows on posts in the category “news”

    #top:not(.news-cat) .avia-post-nav { display: none !important;  }

    I believe this is what you wanted, please see the examples in the Private Content area.

    But I’m a little confused by your last link above, that goes to the page “Φωτογραφίες” because it is not showing the “news” category.
    2018-12-11-201627
    Was this just a example for me to see, or was I suppose to do something with it?
    Thank you.

    Best regards,
    Mike

    #1044349

    Thank you @Mike,
    you are a champ!
    Pease disregard the page Φωτογραφίες as it was an example.

    #1044700

    Hi,
    Glad we could help, unless there is anything else we can help with on this issue, shall we close this then?

    Best regards,
    Mike

    #1044853

    You can close it.
    Thank you very much!

    #1044865

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Enfold – Enable previous and next post navigation’ is closed to new replies.