Created
June 19, 2014 16:42
-
-
Save Shelob9/176f9b6bf98ac8f44e83 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
//**Set name of custom post type in $custom_post_type | |
$custom_post_type = 'NAME_OF_POST_TYPE_HERE'; | |
if ( is_singular( $custom_post_type ) ) { | |
$part = $custom_post_type; | |
} | |
elseif ( is_page() ) { | |
$part = 'page'; | |
} | |
elseif ( is_singular() ) { | |
$part = 'single'; | |
} | |
else { | |
$part = null; | |
} | |
get_template_part( 'content', $part ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment