Created
July 13, 2013 07:11
-
-
Save janisdonis/5989750 to your computer and use it in GitHub Desktop.
Wordpress custom post type single template
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
// Template selection | |
function my_template_redirect() | |
{ | |
global $wp; | |
if ($wp->query_vars["post_type"] == "produkti") | |
{ | |
include(TEMPLATEPATH . "/products-open.php"); | |
die(); | |
} | |
} | |
add_action("template_redirect", 'my_template_redirect'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment