$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Woocommerce template single-product.php in theme folder not working|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Woocommerce template single-product.php in theme folder not working

matteradmin8PV0评论

single-product.php not working for single products. I do not have woocommerce.php file in my theme but still single.php executing for single products. This is a custom theme and when i change my theme name to twentyten then single-product.php started to execute but when i change its name to something else (custom theme name) than this template does not work at all and instead it execute single.php Any suggestion will be much appreciated.

single-product.php not working for single products. I do not have woocommerce.php file in my theme but still single.php executing for single products. This is a custom theme and when i change my theme name to twentyten then single-product.php started to execute but when i change its name to something else (custom theme name) than this template does not work at all and instead it execute single.php Any suggestion will be much appreciated.

Share Improve this question asked Mar 23, 2018 at 12:03 wpddwpdd 3134 silver badges15 bronze badges 4
  • Why are you posting this again? It's been less than a day. Besides, it's about a 3rd-party plugin and off-topic. Please see the WooCommerce developer documentation for supporting WooCommerce in your theme. – Jacob Peattie Commented Mar 23, 2018 at 12:08
  • I was not able to get any response on this issue that is why i post this again. If this is off-topic then why woocommerce tag is available ? – wpdd Commented Mar 23, 2018 at 12:10
  • Firstly, 15 hours is not enough time to say you didn't get a response. Secondly, when you select WooCommerce as a tag a box literally appears right under it that says "OFF TOPIC. Questions specific for this e-commerce plugin have their own forum at wordpress/support/plugin/woocommerce.". – Jacob Peattie Commented Mar 23, 2018 at 12:14
  • 1 Possible duplicate of single-product.php template not working for single products – Jacob Peattie Commented Mar 24, 2018 at 2:57
Add a comment  | 

1 Answer 1

Reset to default 2

I add this line in my theme's functions.php file and now everything working fine.

add_theme_support( 'woocommerce' );
Post a comment

comment list (0)

  1. No comments so far