I am building my custom theme and my single.php displays woocommerce single product page with
if ( have_posts() ) {
while( have_posts() ) {
the_post();
the_content();
}
}
Why is the page missing - title, reviews & breadcrumbs?
CodePudding user response:
Woocommerce has its own templates for their pages. A single product should be showing on single-product.php. You would create a woocommerce folder inside your custom theme and copy the directories and files you want to edit over to your theme.
How to override single-product.php
If you want to custimize the single-product.php, you would create a woocommerce folder in your theme and copy the single-product.php over into it. So the directory would be yourtheme/woocommerce/templates/single-product.php
. This way you have all the actions hooking in the functionality you are missing. If you have any questions, just let me know! :)
Here are the docs: https://woocommerce.com/document/template-structure/
CodePudding user response:
I was missing
add_theme_support('woocommerce');
in my functions.php file