• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Remove Header, Menu and Footer from Page

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › StudioPress Themes › Magazine Pro › Remove Header, Menu and Footer from Page

This topic is: resolved

Tagged: Array, footer, genesis_header, header, is_page, landing page

  • This topic has 10 replies, 2 voices, and was last updated 3 weeks, 4 days ago by Brad Dalton.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • February 19, 2023 at 3:32 pm #506806
    JustZ
    Participant

    Does anyone know how to remove the Header and Menu (the entire top bar) and the Footer and Copyright from a page?

    We are wanting to create a landing page that uses the normal page template versus https://my.studiopress.com/documentation/magazine-pro-theme/page-templates/landing-page-template/ but are unable to remove the header and footer areas.

    February 20, 2023 at 1:44 am #506808
    Brad Dalton
    Participant

    Code snippets are here https://my.studiopress.com/documentation/snippets/

    You can add them to a custom page template or copy and rename the landing page template.

    Or try this code https://wpsites.net/genesis-tutorials/remove-header/


    Tutorials for StudioPress Themes.

    February 22, 2023 at 12:10 pm #506820
    JustZ
    Participant

    Hi Brad,

    Thanks for that info. We don't want to remove the header/navigation/footer for the entire site, just one page. We'd create a custom page template, but the only complete template available in our Theme (Magazine Pro) is the landing page (which we don't like the look of with the black background). We'd ideally like to copy the Default Template, and the code to remove the header/navigation/footer, and then create a custom page template — but we don't see the Default Template available under templated in the Theme Editor.

    For the code that calls our to specific page, is that just placed in the stylesheet in the Theme Editor or can you put it in the Additional CSS area?

    February 22, 2023 at 12:17 pm #506821
    JustZ
    Participant

    We tried the code that calls to a specific page in the Additional CSS area, but it didn't change anything for our page (header still appearing). We flushed the cash and opened in a new browser:

    add_action('get_header', 'wpsites_remove_header');
    /**
    * @author Brad Dalton - WP Sites
    * @example http://wpsites.net/web-design/remove-header/
    */
    function wpsites_remove_header() {
    if (is_page('8651') ) {
    remove_action( 'genesis_header', 'genesis_do_header' );
    }
    }

    February 22, 2023 at 12:25 pm #506822
    Brad Dalton
    Participant

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


    Tutorials for StudioPress Themes.

    February 22, 2023 at 12:41 pm #506823
    JustZ
    Participant

    Thanks Brad! That did the trick, much appreciated for the direction!

    February 27, 2023 at 12:14 pm #506843
    JustZ
    Participant

    Hey Brad,

    One more question if you have a moment.

    The code below worked great. But we were wanting to add another few pages and no matter how we enter the Page ID (addition page ID 8687) we cannot get it to work for multiple pages at a time. Any thoughts/direction?

    // Removes Header Specific Page
    add_action('get_header', 'wpsites_remove_header');
    function wpsites_remove_header() {
    if (is_page('8651')) {
    remove_action( 'genesis_header', 'genesis_do_header' );
    remove_theme_support( 'genesis-menus' );
    remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
    remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
    }
    }

    February 28, 2023 at 8:03 am #506854
    Brad Dalton
    Participant

    Try

    if ( is_page( array( '8687', '8651' ) ) ) {
    

    Tutorials for StudioPress Themes.

    February 28, 2023 at 8:33 am #506855
    JustZ
    Participant

    Hi Brad. Thanks again, that did the trick. Your help has been incredible and really helped us accomplish what we wanted!

    February 28, 2023 at 8:47 am #506856
    JustZ
    Participant
    This reply has been marked as private.
    March 1, 2023 at 5:18 am #506862
    Brad Dalton
    Participant

    Thanks for the positive feedback however i don't have access to private messages.

    Here's more about arrays in PHP for the purests.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Log In

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble