• Resolved epicscisoc

    (@epicscisoc)


    Hello,

    I’m using your plugin for Footer and Header in elementor.

    I use Elementor canvas en most of my pages, so I have check “show also in Elementor Canvas”.

    My question is how can I disable footer in certain pages, for example in landing pages or store cart page or checkout.

    How can I achive that?

    Thanks you

    ??

    Manel

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

    (@nikschavan)

    Hello @epicscisoc,

    There is a filter in the plugin that you can use to achieve this –

    function your_prefix_hide_footer_markup_on_page( $status ) {
    
    	// 130 is the ID of the page where you want to disale the footer.
    	if ( 130 == get_the_id() ) {
    		$status = false;
    	}
    
    	return false;
    
    }
    
    add_filter( 'enable_hfe_render_footer', 'your_prefix_hide_footer_markup_on_page' );

    Here change the ID 130 to the ID of your page that you want to disable the footer on.

    Astra Pro Provides this functionality if your are using the Astra theme using it’s powerful target settings. With that, you can fine-tune the display settings where you want to display/hide specific header/footer.

    • This reply was modified 6 years, 10 months ago by Nikhil Chavan.
    Thread Starter epicscisoc

    (@epicscisoc)

    Thanks you!

    I am having the same issue but I am wanting to remove a header from just one page.
    I used your code above and changed my page ID and also changed the word footer to header throughout your code. It is removing the header on ALL the pages though. What am I doing wrong?

    Plugin Author Nikhil Chavan

    (@nikschavan)

    The last return statement should have $status. Here is the updated snippet for this –

    
    function your_prefix_hide_footer_markup_on_page( $status ) {
    
    	// 130 is the ID of the page where you want to disale the footer.
    	if ( 130 == get_the_id() ) {
    		$status = false;
    	}
    
    	return $status;
    
    }
    
    add_filter( 'enable_hfe_render_footer', 'your_prefix_hide_footer_markup_on_page' );
    • This reply was modified 6 years, 9 months ago by Nikhil Chavan.

    Hi Nikhil! Awesome plugin!
    I’m having the same issue, however I don’t know where to add or modify the snippet. Help!
    Thanks ??

    Plugin Author Nikhil Chavan

    (@nikschavan)

    Hello @czllebleu,

    Here is a documentation that explains where to add the PHP code – https://wpastra.com/docs/add-custom-php-code/

    If you are having troubles using the custom code – Astra Pro + Astra Theme provide this functionality with a target rule system where you can select where exactly you want the header/footer to be displayed.

    Thank you @nikschavan !
    Worked like a charm ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to Disable Footer on some specific pages’ is closed to new replies.