Forums

[resolved] Conditional tag in header (2 posts)

  1. pronetworkads
    Member
    Posted 1 year ago #

    I want to use a different header background for the home page and a different one for the rest of the pages.

    This is the code I'm using in the header.php file, but it is throwing an error on the first line:

    <?php if (!(is_home() ) {?>
    <div class="row1">
    <?php } else {?>
    <div class="row2">
    <?php}?>

    Any ideas?

  2. Evita
    Member
    Posted 1 year ago #

    <?php if ( is_home() ) { ?>
    <div class="row1">
    <?php } else { ?>
    <div class="row2">
    <?php } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic