Tagged: enfold, post navigation
-
AuthorPosts
-
December 23, 2017 at 9:51 am #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?December 23, 2017 at 3:40 pm #891812do 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; }
December 24, 2017 at 12:47 am #891885Hi,
When I view your single blog entries I see the previous and next navagation.
please see screenshot in Private Content areaBest regards,
MikeDecember 2, 2018 at 4:41 am #1039765Hi 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,
VasilisDecember 2, 2018 at 5:05 pm #1039984Hi,
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,
MikeDecember 3, 2018 at 11:36 am #1040224Hi 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!
December 4, 2018 at 1:49 pm #1040719I 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.
December 5, 2018 at 1:57 pm #1041209Hi,
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,
MikeDecember 11, 2018 at 11:02 pm #1044021Hi 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,
VasilisDecember 12, 2018 at 3:20 am #1044090Hi,
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.
Was this just a example for me to see, or was I suppose to do something with it?
Thank you.Best regards,
MikeDecember 12, 2018 at 2:47 pm #1044349Thank you @Mike,
you are a champ!
Pease disregard the page Φωτογραφίες as it was an example.December 13, 2018 at 6:02 am #1044700Hi,
Glad we could help, unless there is anything else we can help with on this issue, shall we close this then?Best regards,
MikeDecember 13, 2018 at 12:31 pm #1044853You can close it.
Thank you very much!December 13, 2018 at 12:52 pm #1044865Hi,
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 -
AuthorPosts
- The topic ‘Enfold – Enable previous and next post navigation’ is closed to new replies.