Support » Fixing WordPress » Only certain pages have headers?

  • Using 2011 theme, I like the headers mostly. But specific pages can I make not have headers? How would I do this without too much messy hacking?
    I have a child theme ready.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Andrew Nevins

    (@anevins)


    Forum moderator


    In your Child Theme header.php file, you may need to wrap the elements you want visible only on certain pages in a conditional statement;
    http://codex.wordpress.org/Conditional_Tags

    So I’d use like
    is_page( ‘About Me And Joe’ )
    is there a way without hard coding the names of pages? I mean is there a way to ‘mark’ a page with something?

    Moderator Andrew Nevins

    (@anevins)


    Forum moderator


    Looking at it another way around, you could check to see if the page is not something. That may be better than specifying multiple is_page names or IDs.

    E.g

    if ( !is_page( '17' ) )

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only certain pages have headers?’ is closed to new replies.