Remove Bricks Header using remove_action

By Grant Ambrose

Here is the PHP Code you can copy and paste to remove the Bricks Builder header using a PHP action hook – specifically render_header.


// remove the Bricks Header
add_action('get_header', 'c_remove_bricks_header');
function c_remove_bricks_header() {
  if( is_singular(array('wffn_optin', 'wffn_oty', 'wffn_landing'))) {
    remove_action( 'render_header', [Bricks\Theme::instance()->frontend, 'render_header'] );
  }
}
Code language: PHP (php)

In the above code, I am removing the Bricks Header from the Post Types that I use for my Sales Funnels built using the FunnelKit plugin.

You just need to add your own PHP Conditions on line 4.

If you are looking for something a bit simpler, I would recommend checking out the below Blog Post where I show you how to remove the Bricks Header and Footer using the Bricks UI on a per-post basis.

RELATED: Remove the Header and Footer in Bricks Builder (The Correct Way)

Leave the first comment

Not sure where to start?

Get my FREE 30-day Course:

QUICK-WINS for Solopreneurs using WordPress to grow their Online Business

The aim of this course is to help Solopreneurs like YOU overcome some of the most common problems you will face when trying to create, manage and update your Business’ WordPress website.

A QUICK-WIN is something you can go and implement into your website TODAY and see improvements instantly.

Each lesson is aimed at helping you overcome 1 headache associated with managing your WordPress website.

The perfect course for Solopreneurs building an Online Business with WordPress

Get Access Now
Some of my best tips and tricks!