From 5194467657838632e5eff515aaac46e42b6ca09d Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 27 Sep 2016 13:28:25 -0400 Subject: [PATCH] adding woocommerce.php to functions.php forceTemplate function --- functions.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/functions.php b/functions.php index 6934766..d50bb3c 100644 --- a/functions.php +++ b/functions.php @@ -156,15 +156,9 @@ add_action('thematic_searchloop', 'mytheme_search_loop'); // 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() { -- 2.17.1