Created
December 13, 2010 19:00
-
-
Save Roach/739417 to your computer and use it in GitHub Desktop.
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
// Redirect template based on post list or single post | |
function template_redirect() | |
{ | |
global $wp; | |
if ($wp->query_vars["post_type"] == "dt_staff" || $wp->query_vars["taxonomy"] == "departments") | |
{ | |
if ( is_robots() ) : | |
do_action('do_robots'); | |
return; | |
elseif($wp->query_vars["name"]): | |
include(WP_PLUGIN_DIR.'/'.basename(dirname(__FILE__)).'/dt-staff-single.php'); | |
echo ('single post'); | |
die(); | |
else: | |
include(WP_PLUGIN_DIR.'/'.basename(dirname(__FILE__)).'/dt-staff-list.php'); | |
echo ('list page'); | |
die(); | |
endif; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment