Two Categories in the same Post
-
Two Categories in the same Post.
I was trying to apply to a single post two different categories for two different ways of seeing the same Post. So as usual I go to ( single.php ) and add this:<?php /* Single Post Template: Single Play Description: Post Template */ ?> <?php $post=$wp_query->post; $cat = array(5); if(in_category($cat)) { include 'single-custom.php'; } else if ( in_category( 'lux' ) ) { ?> <?php get_header('single'); ?> & more...the permalink structure:
%category%/%postname%except that when I try to watch the same post in two different categories, is presented in the same way taking into account only the first cat => (5) name == cobalt, in alphabetical order of appearance.
Is there a way to give two distinct categories in the name and then also in the style?
tnx Mario
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Two Categories in the same Post’ is closed to new replies.