Posts

Make themes woocommerce compatible

How to make themes woocommerce compatible?

Want to make themes woocommerce compatible? When you build WordPress themes from the scratch, generally WooCommerce support is not integrated. To integrate the Woocommerce function, you need to make some tweaks in your themes files. First, duplicate your page.php in themes. Rename it to woocommerce.php . Then open and remove the WordPress post/page loop by woocommerce loop. Probably your page.php codes are like…


<?php
 while ( have_posts() ) : the_post(); ?>
 <h2><?php the_title(); ?> </h2> <?php
 the_content();

 endwhile; // End of the loop.
 ?>

should be replaced by


<?php woocommerce_content(); ?>

If you see this technique is not working, then open Woocommerce plugins file, copy “templates” folder to your themes. Rename it to “woocommerce”.  Now your need to add CSS class manually to woocommerce defaults files. Just for an example, to compatible single products, open the folder single-products, now add your CSS class to  meta.php , price.php and others to make it as you wish.

It’d be better if you create woocommerce theme from scratch. Just make a blueprint before starting. Otherwise, this post may help you. If you need further help or want to make Woocommerce website, just contact here.