WordPress.org

Ready to get started?Download WordPress

Forums

header removal (5 posts)

  1. ross6000
    Member
    Posted 1 year ago #

    Im trying to remove my header from some pages in twentyeleven theme..I want to keep it on my front page and just remove it from the other pages.. is this possible?

  2. patv
    Member
    Posted 1 year ago #

    Using conditional tags, you can do the following in your header:

    <?php if(!is_front_page()): ?>
    <!-- code you want exclusively for the front page -->
    <?php else: ?>
    <!-- code you want on all other pages not the front page -->
    <?php endif;?>
    
    <!-- code you want for all pages -->
  3. esmi
    Forum Moderator
    Posted 1 year ago #

    Do not edit the Twenty Eleven theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. First create a child theme for your changes.

  4. patv
    Member
    Posted 1 year ago #

    @esmi good idea, thanks for pointing that out. Didn't realize he was editing the default theme.

  5. ross6000
    Member
    Posted 1 year ago #

    thanks.. ill give it a try..

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.