/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $post = $wp_query->post; if ( in_category('1') ) { include('single-foo1.php'); } elseif ( in_category('2') ) { include('single-foo2.php'); } else { include('single-normal.php'); } ?>
Comments
