Remove Genesis Site Header Using PHP or CSS Code

This code removes both the site header and header markup in any Genesis child theme.

If you paste this code into your functions file, it will remove your header from every page.

Otherwise you can paste the code into any template file like a page_landing.php file and it will only remove the header from landing pages using that template.

Remove Genesis Header Using Plugin

Another way to remove your header is to use the Genesis Simple Hooks plugin.

You can simply unhook your header. This won’t remove the header widget, title or description, only the header.

unhook Genesis header

Other options are to remove some or all of the header elements based on specific conditions.

There’s at least 4 ways to do this:

  1. You can do this using a conditional statement within a function which includes the remove action.
  2. Or you can use the Simple Hooks plugin and place the code in the genesis_header hook field
  3. Or create a custom body class using a permalink slug or i.d and remove a header from a category or tag page using CSS.
  4. Or you can use custom body classes to remove your header on specific url’s using CSS

Remove Header Using PHP Code

PHP code should be pasted at the end of your child themes functions.php file.

Remove Header On All Single Posts Genesis

Remove Header Exclude Home Page Genesis

Remove Header Specific Page

Remove Header & Markup Home Page

Remove Genesis Header Using CSS

Paste this code into your child themes style.css file.

It will remove your header from your entire site so your nav menu moves to the top of the screen.

.site-header {
     display: none;
}

Comments

4 responses to “Remove Genesis Site Header Using PHP or CSS Code”

  1. I want to hide a shortcut in the header text widget menu for a certain page.

    The “Remove Header Specific Page” is a alternate solution, but I prefer to display the header without the shortcut on a specific page.

    Suggestions?

    Thanks.

    1. Brad Dalton Avatar
      Brad Dalton

      what does this mean “hide a shortcut”?

      1. I meant “shortcode”.

        My site’s header/textwidget contains a login shortcode.

        I want to hide the shortcode on the password reset page because there is a conflict.

        I can hide the entire header, per “Remove Header Specific Page” which resolves the conflict.

        However, I am looking for a way to still display the header on the password reset page but hide the login shortcode.

        This might also work using CSS.

        1. Brad Dalton Avatar
          Brad Dalton

          View the source code to find the body classes and use that specific post/page i.d to hide the shortcode.

          Otherwise, you would need to modify the add_shortcode function or remove the header right widget using PHP code.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.