• I want to change my contact form color in my website but it should be different color in every page so I decided to create a if is page conditional css. I put this code in my header.php but it didn’t work

    <style type="text/css">
    <?php
    if(is_page('6')){ ?>
    
    .form {
        color: #FFFFFF !important;
    }
    
    <?php
    } else {?>
    
    .form  {
        color: #000000 !important;
    }
    
    <?php
    }
    ?>
    </style>

The topic ‘if is page conditional css not working’ is closed to new replies.