-
AuthorPosts
-
May 19, 2016 at 12:44 am #634834
Hope all is well!
Is it possible to prevent posts of a certain type or category from being included in the side post navigation? I want to prevent any “link” posts from displaying in that edge post navigation. (I’m using link posts to allow some pages to collect and appear in post sliders / grids…and when they appear in the edge post navigation they don’t actually link to the pages, they go to the link post instead.)
Please advise. Thanks!
May 20, 2016 at 4:20 am #635660Hey smittypages,
Thank you for using Enfold.
Hide the link format posts with this:
.newsbox .post-format-link { display: none !important; }
Best regards,
IsmaelMay 20, 2016 at 5:20 pm #635978Thanks for being in touch – I’m trying it, but its not preventing the link format posts from displaying in the side .avia-post-nav. Any other ideas?
May 23, 2016 at 3:49 pm #636859Hi,
not sure what you want to achieve. I can’t find any issues on your site. Can you explain further please? and please add some screenshots to make things clear for us. Use imgur.com or dropbox.
Best regards,
AndyMay 23, 2016 at 5:25 pm #636965Andy – thanks for checking in on this. All I’m hoping to do is prevent posts of a specific category “case studies” or posts of a certain format “Link” from appearing in the avia-post-nav that appears on the left/right edges when viewing individual posts. (We use “Link” post formats to create post slider and grid links that lead to pages instead of posts, but don’t want these “Link” posts of the “case studies” category to be included in the edge avia-post-nav.) I will share a DropBox link in private message. Thanks!
May 26, 2016 at 4:37 am #638432Hi,
I see. I didn’t understand you at first because I thought that you’re referring to the news widget when you said “side post navigation”. Please add this in the functions.php file:
add_filter('avia_post_nav_entries', 'avia_post_nav_entries_mod', 10, 2); function avia_post_nav_entries_mod($entries, $settings) { $settings['excluded_terms'] = 5; if(version_compare($settings['wpversion'], '3.8', '>=' )) { $entries['prev'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); $entries['next'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); } else { $entries['prev'] = get_previous_post($settings['same_category']); $entries['next'] = get_next_post($settings['same_category']); } return $entries; }
After that, edit the posts with link format then add a unique category to them. Replace the value of the $settings[‘excluded_terms’] variable with the id of the new category.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.