• Resolved bobover3

    (@bobover3)


    My Theme – The Morning After – puts the same header area on every page. There’s one single page where I want no header at all. Can anyone help me do this? Thanks in advance to the WordPress gurus!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,
    What is the website and page?

    If you are comfortable editing your theme, you can do the following…

    In your header.php file around the part of code you don’t want add the following…

    <?php if (!is_page('')) { ?>

    ***** The Header Code is HERE *****

    <?php } ?>

    And within the quotes: is_page(”), put the page ID and that will make it so the header will not show on that page only.

    Hope this helps

    Thread Starter bobover3

    (@bobover3)

    Thanks so much, genusone! That works. If I want this to apply to two pages, should I put both page IDs in the quote, separated by a comma? Or should I put each page ID in quotes, both quotes separated by a comma? page(‘1,2’) or page(‘1′,’2’)?

    What I did was put your code at the very top and very bottom of header.php.

    Mat Lipe, thanks for responding!

    If you want to add more than one page you should add them to an array like so.

    Example: to include page 1 and page 8

    if( !is_page( array( 1, 8 ) ){ ?>

    Actually I missed a “)” on the last example.

    if( !is_page( array( 1, 8 )) ){ ?>

    Thread Starter bobover3

    (@bobover3)

    Thanks, Mat! It worked. You made the hard (for me) easy.

    Thread Starter bobover3

    (@bobover3)

    I followed instructions and put the code to exclude certain pages at the top and bottom of header.php. It worked perfectly, but seems to have caused a problem.

    The pages I created this way have a live link called Edit. Anyone viewing my pages who clicked on the link would be brought inside my WordPress Admin Panel, where they could edit the page – and anything else on my site!

    What can I do?

    Thanks for your ongoing help!

    Thread Starter bobover3

    (@bobover3)

    When I visit the page without being logged in to the Admin Panel, the “Edit” link is gone. Problem solved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to Remove Theme Header from One Page’ is closed to new replies.