Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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.

    #870339

    Hey 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 Shannon

    #1223641

    As 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 );
    #1223649

    Hey,

    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,
    Yigit

    #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 );
    #1223668

    Hi,

    My bad, overlooked that one. Thanks for the notice, updated that one as well :)

    Best regards,
    Yigit

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