Hide / Disable header

Not directly related to BB so apologies.

Is it possible to disable the header of a site completely on mobile devices? I’d like to replace the header with a responsive module in BB but can’t figure out how to disable the header.

Thanks
Andrew

[Content Hidden]

Hi Andrew,

The site you linked appears to be behind a password. Can we have the password so we can see what theme you’re using, please?

Thanks,
Danny

[Content Hidden]

I’ve managed to disable the header for all devices using:

remove_action( ‘genesis_header’, ‘genesis_header_markup_open’, 5 );
remove_action( ‘genesis_header’, ‘genesis_do_header’ );
remove_action( ‘genesis_header’, ‘genesis_header_markup_close’, 15 );

I’ve installed the Mobble plugin which adds functionality to remove / display items at various screen sizes but I’m stumped on where to go next.

Any suggestions would be highly appreciated.

Thanks
Andrew

Hey Andrew,

We’re not really well versed with the Genesis themes. I’d suggest asking this same question over to the BB FB Group or Slack Channel. We’ve a lot more active users there. :slight_smile:

Ben

Will do Carlo.

Thanks.

Is this an easy thing to do on the BB theme?

Hi Andrew,

It’s not possible out-the-box. However, you could use the BB theme along with the BB child theme to achieve this by creating a custom template. However, please be aware the following method will require you to assign the template via page editor in the WordPress admin dashboard.

  1. Create a new template file and call it something specific like tpl-no-header-footer-mobile.php.

  2. Copy the contents from the tpl-no-header-footer.php that’s inside the BB theme directory.

  3. Paste the code from that template into your new template.

  4. Where you have the following code:

add_filter( 'fl_topbar_enabled', '__return_false' );
add_filter( 'fl_fixed_header_enabled', '__return_false' );
add_filter( 'fl_header_enabled', '__return_false' );
add_filter( 'fl_footer_enabled', '__return_false' );
  1. Wrap that code using the wp_is_mobile() function like so:
if ( wp_is_mobile() ) {
  add_filter( 'fl_topbar_enabled', '__return_false' );
  add_filter( 'fl_fixed_header_enabled', '__return_false' );
  add_filter( 'fl_header_enabled', '__return_false' );
  add_filter( 'fl_footer_enabled', '__return_false' );
}
  1. Save the changes and then go to your WordPress Admin Dashboard > Pages and select the page where you want no header/footer on mobile devices.

  2. Select the new template you created from the Page Attributes area and publish the changes.

When you view your site on mobile devices there should be no header or footer.

Thanks,
Danny

Many thanks

Might upgrade to the BB Theme.

For reference, managed to achieve the look I wanted with the Genesis Dambuster plugin which plays very well with BB.

Thanks again

Awesome! And thanks for taking the time to inform us! Enjoy! :slight_smile:

Ben