How to add a colored box to the top of each page (that is not the frontpage)
-
Hi,
I am working on a site where I need to add a <div> with some content in it at the top of each static page.The <div> should be one color on some pages and another on other pages.
The CSS works fine, but my code doesn’t…it just adds both the divs on all pages except the frontpage.I have this code so far:
<?php if( !is_front_page() ) { //if we are not on the front page ?> <div class="row"> if(is_page('ydelser-2')) { <div class="hidden-phone top_box"> We will add content here </div> } ?> elseif(is_page('blog-2')) { <div class="hidden-phone top_box_blog"> We will add more content here </div> } ?> </div> <?php } ?>
Can anyone solve this riddle for me…?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to add a colored box to the top of each page (that is not the frontpage)’ is closed to new replies.