Viewing 10 replies - 1 through 10 (of 10 total)
  • If you just need to hide it so its not visible to people viewing the page, this is probably the simplest way – add this to your style.css:

    .page-id-5425 #outerheader {
      display:none;
    }

    That will hide the header on just that page. To hide it on additional pages, find their page IDs by hovering over an ‘edit page’ link and looking in your browser status bar, the ID is usually toward the end in the URL displayed there. Then add those ids like so to the css:

    .page-id-5425 #outerheader, .page-id-5555 #outerheader,.page-id-6666 #outerheader  {
      display:none;
    }

    This is admittedly clunky as everything is hard-coded. A smarter way to do it would be to create a custom page template. If you name your page template file “page-no-header.php” every Page assigned to this template via the Page Attributes panel when editing a Page would have “page-template-page-no-header-php” added to its body classes. You could then use that to set the display to none, rather than having to specify every ID:

    .page-template-page-no-header-php #outerHeader {
      display:none;
    }

    Hope this helps!

    Thread Starter kirawalton

    (@kirawalton)

    This does help, Michelle, thank you so much!

    One super-newbie question: where in style.css do I paste this?

    .page-id-5425 #outerheader {
    display:none;
    }

    At the very end should work.

    Thread Starter kirawalton

    (@kirawalton)

    Oh, and I just realized: I’ll need to remove the footer content, too!

    Thanks in advance for your help.

    Thread Starter kirawalton

    (@kirawalton)

    Hmmm. Just pasted to the very end, and no change to the page.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You don’t want to be editing the theme’s files like that.

    Install this Custom CSS Manager plugin http://wordpress.org/plugins/custom-css-manager-plugin

    Then use its “CSS Code” section of the dashboard to hold your CSS modifications.

    Thread Starter kirawalton

    (@kirawalton)

    Oh dear. Thanks, Andrew. I’ll try that.

    I know just enough to go in and shut down my entire site and not enough to fix it. 😉

    Thread Starter kirawalton

    (@kirawalton)

    SUCCESS!!! Thank you both so much.

    One more quick question: how can I remove the footer on this same page?

    Your footer looks like it’s in #outerfootersidebar and #outerfooter so you’d need to add those to your list of things to display:none on.

    .page-id-5425 #outerheader, .page-id-5425 #outerfootersidebar, .page-id-5425 #outerfooter {
    display:none;
    }

    Thread Starter kirawalton

    (@kirawalton)

    Thanks so much Michelle! I really appreciate it – didn’t realize that the forum isn’t the place for questions about commercial themes. I really appreciate your time!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Remove header nav from specific pages’ is closed to new replies.