Actually I am working on WordPress Woocommerce. I have searched out in WooCommerce Plugin, I saw single product page i.e. single-product.php in template folder. And there is a loop which display complete product description.
<?php while ( have_posts() ) : the_post(); ?>
<?php wc_get_template_part( 'content', 'single-product' ); ?>
<?php endwhile; // end of the loop. ?>
<?php
?>
Now I did not understand where is the whole page setting and how to reset its order for displaying different product attributes like price, image , product description and etc.
So Please help me about how to embed or integrate my HTML into Woo Commerce Single Product Page.
Any Help Will be Appreciated.
Thanks
You need to create a folder named
woocommerce
inside your themes folder and copy the contents of the templates folder of the woocommere plugin inside your themes folder. In this way you are able to overwrite the default content.After completing the above, look for a file content-single-product in the
woocommerce
folder in your themes’s folder. You’ll see lots of hooks anddo_action
s. Don’t panic. These are just calling the files from thesingle-product
folder inside thewoocommerce
folder. In that folder the files are nicely titled and grouped and you’ll know what one file is responsible just by seeing the file title. For exampleprice.php
for displaying the price,product-attributes.php
for product attributes (in case the product is variable).Play around with these files. If you need the original ones you’ll find them again in the woocommerce plugin’s folder.
EDIT
look in the content-single-product.php between line 40-60:
This
do_action( 'woocommerce_single_product_summary' );
is responsible for calling the above listed hooked functions. the number next to the name is the order. The lower the number the higher is the order. Assuming you want them all but in different order you replace this section with the following-Go to this file in your woocommerce plugin folder
By modifying the hooks (changing or adding new) you can change the layout and all in single product page.