WordPress.org

Ready to get started?Download WordPress

Forums

Only certain pages have headers? (4 posts)

  1. funsail
    Member
    Posted 1 year ago #

    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.

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    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

  3. funsail
    Member
    Posted 1 year ago #

    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?

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    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' ) )

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.