How to display product summary from single product page in sidebar of Woocommerce?

In this tutorial we’ll learn how to display product summary from single product page to sidebar of woocommerce.

Here is the default product screen:


Now we need to display the bordered content in the sidebar.

To do this add the following lines of code in your theme’s sidebar.php file:


                if(is_product()) {

                                do_action( 'woocommerce_single_product_summary' );



You can access sidebar.php file here:


Place the code and click on Update File button to save it.


Now, if you’ll go to product page again you’ll see the product related content being displayed in sidebar.


You can remove the unnecessary content with CSS.


About the author

We provide WordPress & WooCommerce Support, Maintenance and Development Services.

Leave a Reply

Get New WordPress & WooCommerce Code Snippets! (Weekly)

We find new codes snippets to improve your existing Websites.