// START FORCE TEMPLATE FUNCTIONS
add_filter( 'template_include', 'glm_force_template', 99 );
function glm_force_template( $template ) {
- global $post;
- /*
- * Uncomment this IF statement surrounding the locate_template line
- * if you want to use the given template (index.php) EVERY time any page
- * template is selected & included.
- */
- //if (get_page_template_slug( $post->ID ) == "test-template") {
+ if ($template != locate_template("woocommerce.php")) {
$template = locate_template( "index.php" );
- //}
+ }
return $template;
}
function get_custom_page_templates() {