Posted By

welshstew on 06/09/09


Tagged

wordpress


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

fragmentist
joelhaus


mutiple layout for single post - wordpress


 / Published in: PHP
 

  1. <?php
  2. $post = $wp_query->post;
  3. if ( in_category('1') ) {
  4. include('single-foo1.php');
  5. } elseif ( in_category('2') ) {
  6. include('single-foo2.php');
  7. }
  8. else {
  9. include('single-normal.php');
  10. }
  11. ?>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Swat-Khan on July 25, 2009

Great addition.

I was looking for something like this.

Thanks,

Swat Khan

You need to login to post a comment.