custom posts by categories for portfolio
-
Hi guys,
I am using the carbon lite theme for WordPress 3.5.2 as it has built in portfolio taxonomy already included. They use the get_template_part() to call the template for the post and all I need to do is add some functionality so that it calls another template file if it is in a certain category. I have looked all over the net to try and get some help and my final effort is to ask for it. The code in my single.php file looks like this:
<?php if ( '' != locate_template( 'content-'.get_post_type().'.php' ) ) // Check if themplate exists esle get default post content { get_template_part( 'content', get_post_type() ); } else { get_template_part( 'content', 'post' ); } ?>
Let me know if any other code is required for problem solving. I’m solving this problem offline till I get it to work and then will upload it to the live site. Please any assistance at this point would be helpful.
Thanks in advance
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘custom posts by categories for portfolio’ is closed to new replies.