WooCommerce: Post Title missing from Product page

If certain Product information is missing from your WordPress theme with WooCommerce support, this code snippet will help.


If you’re working on a custom WordPress theme with WooCommerce support, you may be using template overrides by copying WooCommerce templates from the Plugins directory to your theme directory. If this is the case, then you might discover that certain information is missing from your Product pages (on a template like single-product.php).

To resolve this, simply add the following code snippet to your functions.php file or equivalent. The WooCommerce Theme Developer Handbook outlines that “WooCommerce template overrides are only enabled on themes that declare WooCommerce support”, so by declaring WooCommerce support on your theme, your templates should start behaving correctly.


function barebones_add_woocommerce_support() {
	add_theme_support( 'woocommerce' );
}
add_action( 'after_setup_theme', 'barebones_add_woocommerce_support' );

A lightweight, intuitive WordPress theme to enable flexible developement.

  • Lighting-fast installer
  • Intuitive SASS structure
  • Bloat-free

Build with Barebones