Posted By

scitrenbaumgmailcom on 07/12/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

manavecplan


Wordpress Conditional Tags In Action (Different Sidebars)


 / Published in: PHP
 

  1. <?php if ( is_front_page() ) {?>
  2. <div id="home_sidebar">
  3. ...sidebar content.....
  4. </div>
  5. <?php } /* end home_sidebar */ ?>
  6.  
  7. <?php if ( is_page() && !is_front_page() ) {?>
  8. <div id="pages_sidebar">
  9. ...sidebar content.....
  10. </div>
  11. <?php } /* end pages_sidebar */ ?>
  12.  
  13. <?php else {?>
  14. <div id="blog_sidebar">
  15. ...sidebar content.....
  16. </div>
  17. <?php } /* end blog_sidebar */ ?>

Report this snippet  

You need to login to post a comment.