Posted By

ryarwood on 08/04/10


Tagged

php wordpress category archive detection


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

osirisinternet
maxvee8
kwameboame


Wordpress Category Detection


 / Published in: PHP
 

  1. <?php
  2. $post = $wp_query->post;
  3. if ( in_category('7') ) {
  4. include(TEMPLATEPATH . '/archive-video-two.php');
  5. } else if ( in_category('8') ) {
  6. include(TEMPLATEPATH . '/archive-photo.php');
  7. } else if ( in_category('3') ) {
  8. include(TEMPLATEPATH . '/archive-video.php');
  9. } else if ( in_category('6') ) {
  10. include(TEMPLATEPATH . '/archive-video-three.php');
  11. } else if ( in_category('4') ) {
  12. include(TEMPLATEPATH . '/archive-video-two.php');
  13. } else if ( in_category('5') ) {
  14. include(TEMPLATEPATH . '/archive-video-two.php');
  15. }
  16. ?>

Report this snippet  

You need to login to post a comment.