Website Building » WooCommerce » How Do I Move a Description in WooCommerce?

How Do I Move a Description in WooCommerce?

Last updated on January 18, 2023 @ 1:15 pm

If you have a WooCommerce store, you may have noticed that the product description is not always where you want it to be. Maybe you want it above the Add to Cart button, or below the product image. Whatever the reason, moving the product description is easy to do with just a few lines of code.

First, you need to find the template file that contains the code for the product page. This can be found in yourtheme/woocommerce/single-product.php. If this file doesn’t exist in your theme, you can create it by copying single-product.php from the WooCommerce plugin folder (wp-content/plugins/woocommerce/templates/) and pasting it into your theme folder.

Once you have located or created single-product.php, open it in a text editor and find the line of code that looks like this:

<?php WooCommerce_template_single_title(); ?>

This is the line of code that outputs the product title. Directly below this, you will see this line of code:

<?php WooCommerce_template_single_excerpt(); ?>

This is the line of code that outputs the product excerpt (the short description). If you want the product description to appear below the title, all you need to do is move this line of code below the title line like so:

PRO TIP: If you are thinking about moving a description in WooCommerce, be aware that this can cause problems with your product pages. If you do not have a good reason for moving the description, it is best to leave it where it is.
<?php WooCommerce_template_single_title(); ?> 
<?php WooCommerce_template_single_excerpt(); ?>

If you want the product description to appear above the Add to Cart button, you need to find this line of code:

<?php WooCommerce_template_single_add_to_cart(); ?>

And move it below the description like so:

<?php WooCommerce_template_single_excerpt(); ?> 
<?php WooCommerce_template_single_add_to_cart(); ?>
Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.