How to Reorder WooCommerce Product Page Elements Without a Plugin

Rearrange WooCommerce product prices, descriptions, and add-to-cart buttons in classic product templates using PHP hooks, without installing a plugin.

Last updated:

Reviewed for accuracy by Jesse Nickles

Check which product layout you use

Before changing PHP, check how the Single Product page is built. In a block theme, go to Appearance → Editor → Templates → Single Product and inspect List View. If the price and description are separate, editable blocks, you can move them in the Site Editor and save the template. A template containing a single woocommerce/legacy-template block instead renders the classic PHP layout, so the hook method below can still apply. Classic themes such as HoverCraft also use PHP product templates. WooCommerce's product-page theming documentation explains the two layouts.

Move the price below the short description

  1. Back up your store and test the change on staging before editing PHP.
  2. Open functions.php in your active child theme. If you need one, follow HoverCraft's Child Themes documentation. Do not edit the parent theme: its updates can overwrite your changes.
  3. Paste the snippet inside the existing PHP code without adding another <?php tag. Replace myshop in the function name and the final add_action() call with a prefix unique to your site.
    function myshop_move_product_price() {
    	if ( ! function_exists( 'is_product' ) || ! is_product() ) {
    		return;
    	}
    
    	remove_action(
    		'woocommerce_single_product_summary',
    		'woocommerce_template_single_price',
    		10
    	);
    	add_action(
    		'woocommerce_single_product_summary',
    		'woocommerce_template_single_price',
    		25
    	);
    }
    add_action( 'wp', 'myshop_move_product_price' );
  4. Save the file and check several product pages, including a variable product.

The wp action runs after WordPress identifies the page, allowing is_product() to limit the change to individual products. The snippet removes the price callback at its original priority 10 and adds it back at 25, between the short description at 20 and Add to Cart at 30. It changes the display order, not the product price.

Default order of product summary elements

Classic WooCommerce product templates use the woocommerce_single_product_summary action to display product details. Its functions, or callbacks, run in priority order: lower numbers run first. The values below are WooCommerce defaults, not guaranteed positions in a customized theme.

ElementCallbackPriority
Product titlewoocommerce_template_single_title5
Ratingwoocommerce_template_single_rating10
Pricewoocommerce_template_single_price10
Short descriptionwoocommerce_template_single_excerpt20
Add-to-cart controlswoocommerce_template_single_add_to_cart30
SKU and product metadatawoocommerce_template_single_meta40

WooCommerce lists these defaults in its classic product template. Rating and price both have priority 10; their order at that priority depends on registration order. Themes and extensions can also remove or move callbacks.

Move another summary element

Use the table to identify the callback and the priority you need to remove. For example, to move the short description below Add to Cart, replace woocommerce_template_single_price in both calls with woocommerce_template_single_excerpt, change the remove_action() priority from 10 to its original 20, and keep the add_action() priority at 35 instead of 25. The description then appears after Add to Cart at 30 and before product metadata at 40. If you create a separate snippet, use a different, unique function name.

These hooks rearrange the classic product summary, not the gallery or the whole page. If you only need a message below the purchase controls, HoverCraft's After Add To Cart widget area is simpler and does not require PHP.

If the order does not change

To undo the change, remove the snippet and restore any other callback customizations you changed.