+91-943-185-6038 me@shashidharkumar.com

wordpressTo use WooCommerce’s price in your custom theme template open the template file and use the following code and see the magic.
Example

<?php
global $post, $product;
?>
<span itemprop=”price” class=”price”><?php echo $product->get_price_html(); ?></span>

For default price template file of woocommerece you can look at folloiwng location
yourtheme/woocommerce/loop/price.php. Open the file up and see the code used for the same
<?php
global $product;
?>

<?php if ( $price_html = $product->get_price_html() ) : ?>
<span class=”price”><?php echo $price_html; ?></span>
<?php endif; ?>

See also  Random Post for widget in wordpress