Posted By

ivorpad on 12/11/10


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

kwameboame
qubestream


Include More than 2 Singles.php


 / Published in: PHP
 

  1. <?php
  2. $post = $wp_query->post;
  3. if ( in_category('3') ) {
  4. include(TEMPLATEPATH . '/single-blog.php'); }
  5. elseif ( in_category('15') ) {
  6. include(TEMPLATEPATH . '/single-foto.php'); }
  7. elseif ( in_category('18') ) {
  8. include(TEMPLATEPATH . '/single-video.php'); }
  9. else { include(TEMPLATEPATH . '/single-default.php');
  10. }
  11. ?>

Report this snippet  

You need to login to post a comment.