Created
July 30, 2014 14:53
-
-
Save jpcontrerasv/f28880764782d4425bb9 to your computer and use it in GitHub Desktop.
Single custom cat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_custom_cat_template($single_template) { | |
global $post; | |
if ( in_category( 'category-name' )) { | |
$single_template = dirname( __FILE__ ) . '/single-template.php'; | |
} | |
return $single_template; | |
} | |
add_filter( "single_template", "get_custom_cat_template" ) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment