Support » Plugin: Header Footer for Beaver Builder » trying to hide header footer on one page

  • Resolved vinnymickey

    (@vinnymickey)


    Trying to use landing page template and removing header footer on this page.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Nikhil Chavan

    (@nikschavan)

    Hello @vinnymickey,

    Right now this can be done using custom PHP code –
    In the below example change 41 to the ID of the page where you want to disable the Header/Footer

    /**
     * Override the Settings of BB Header Footer on specific page.
     * 
     * @param  String|int $setting Setting output.
     * @return String|int          Modified Setting output.
     */
    function your_prefix_disable_bbhf_settings( $setting ) {
    
    	// Change this to the ID of your page.
    	// Refer WordPress template tags for more advanced conditions - https://codex.wordpress.org/Template_Tags
    	if ( 41 == get_the_ID() ) {
    		$setting = '';
    	}
    
    	return $setting;
    }
    
    // Disable Header.
    add_filter( 'bhf_setting_bb_header_id', 'your_prefix_disable_bbhf_settings' );
    
    // Disable Footer.
    add_filter( 'bhf_setting_bb_footer_id', 'your_prefix_disable_bbhf_settings' );

    I am using Beaver Builder theme, with a child theme installed.
    This code does not seem to work for BB Theme. Are you able to provide the override for BB Theme? Also where are we putting this php code? Function.php? (Template).php? Plugin php?

    Thanks…

    • This reply was modified 1 year, 9 months ago by seememedia.

    I ended up using CSS

    
    body.page-id-xxx header{display:none}
    body.page-id-xxx footer{display:none}

    Vinnymickey… that worked great! Thanks!

    Need to do this again on page below. For some reason with astra I am getting a glitch when trying to remove header with CSS code above.

    Header seems to get stuck and needs refreshing..

    Plugin Author Nikhil Chavan

    (@nikschavan)

    Hello @vinnymickey,

    The page that you have linked already has the header disabled.

    BTW – With Astra theme it should automatically disable the Astra’s header when adding header form this plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘trying to hide header footer on one page’ is closed to new replies.