Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to add an ad banner to my wordpress homepage (in the header) plus a separate ad banner for all other pages (in the header). I did get the banner up for just the homepage but I'm trying to figure the code to complete this issue.

<?php if ( is_home() ) { ?><div id="banner">my content</div><?php } ?>

How can I get another ad banner on all other pages/posts? Thanks.

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

What about

<?php if ( is_home() ) { ?><div id="banner">my content</div><?php } else { ?><div id="banner">not-home banner/div><?php } ?>
share|improve this answer
    
Perfect! Thanks so much! –  eddie Jun 13 '12 at 3:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.