No results found. Try again with different words?

Search must be at least 3 characters.

How to Disable Primary Header?

Sidebar Image

Did not find a solution? We are here to help you succeed.

You can disable Astra Primary Header from the entire site by adding a filter code to the child theme’s functions.php file. 

If you’re using the Old (Legacy) Astra Header for your website, you can add the following code:

add_action( 'wp', 'astra_remove_header' );

function astra_remove_header() {
    remove_action( 'astra_masthead', 'astra_masthead_primary_template' );
}

On the other side, if you’re using the new Header Footer Builder (or decided to switch to it from the Legacy Header), you will need to use a different code instead:

add_action( 'wp' , 'astra_remove_new_header' );

function astra_remove_new_header() {
remove_action( 'astra_primary_header', array( Astra_Builder_Header::get_instance(), 'primary_header' ) );
remove_action( 'astra_mobile_primary_header', array( Astra_Builder_Header::get_instance(), 'mobile_primary_header' ) );
}
Was this article helpful?
Sidebar Image

Did not find a solution? We are here to help you succeed.

Related Docs

Join 1,653,898+ Happy Site Owners Using Astra

Whether you are a beginner, small business owner, or professional web developer, Astra provides all the tools you need to easily build your beautiful WordPress website.

Download is Just A Click Away!

Membership Retention Checklist Download

REWIND

YEAR IN REVIEW

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form
Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form