Support » Themes and Templates » Conditional tags in header

  • I’m trying to use the same header across my entire site and have successfully used conditional tags to generate a separate front page and single post page using this code:

    `
    <!–START HOME–><?php if ( is_home() ) { ?>

    HTML CODE GOES HERE FOR FRONT PAGE

    <?php } ?>
    <!–END HOME–>

    <!–START INSIDE–>
    <?php if ( is_single() ) { ?>

    HTML CODE GOES HERE FOR INSIDE PAGES

    <?php } ?>
    <!–END INSIDE–>

    However, I’d like the code where you see the words “HTML CODE GOES HERE FOR INSIDE PAGES” to apply to every page except the front page (i.e. category pages, archive pages). I’m not using some of the WordPress pages (such as the tag pages). I only know a little PHP and haven’t been able to figure out the correct code to get this to work.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Conditional tags in header’ is closed to new replies.