-
AuthorPosts
-
October 29, 2017 at 9:34 pm #870219
How to disable the post navigation that links to the next/previous post on single entries?
I did check the box in Enfold\ Blog Layout\ Disable the post navigation, but the navigation is still there.October 30, 2017 at 6:28 am #870339Hey tennetno,
Please add following code to Functions.php file in Appearance > Editor
function no_post_nav($entries) { $entries = array(); return $entries; } add_filter('avia_post_nav_entries','no_post_nav');Best regards,
Jordan ShannonJune 18, 2020 at 10:57 am #1223641As this is one of the top Google search results for how to remove the Enfold Post Navigation / Previous / Next Buttons:
You should use this code with more recent versions of Enfold instead to prevent PHP Warnings:/* Remove Post navigation */ function custom_disable_avia_post_nav( $settings ) { $settings['skip_output'] = true; return $settings; } add_filter( 'avf_post_nav_settings', 'custom_disable_avia_post_nav', 10, 1 );June 18, 2020 at 11:24 am #1223649Hey,
Thanks for sharing, Jan!
We have added it to our docs as well – https://kriesi.at/documentation/enfold/blog-post/#remove-post-navigation :)Best regards,
YigitJune 18, 2020 at 11:41 am #1223660@yigit: You are welcome! You should also update the code example for “Remove Post Navigation for a post type” in your docs.
/* Remove Post navigation for CPT */ function custom_disable_avia_post_nav_for_cpt( $settings ) { if ( is_singular( 'portfolio' )) { $settings['skip_output'] = true; } return $settings; } add_filter( 'avf_post_nav_settings', 'custom_disable_avia_post_nav_for_cpt', 10, 1 );June 18, 2020 at 11:55 am #1223668 -
AuthorPosts
- You must be logged in to reply to this topic.
