Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To reposition the short description in the Astra WordPress theme for single product pages, you can use the following steps:

  1. Go to your WordPress dashboard and navigate to Appearance > Theme Editor.
  2. Select the functions.php file from the list of files on the right-hand side.
  3. Add the following code to the bottom of the functions.php file:

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );

  4. Save the changes to the functions.php file.

  5. Next, go to Appearance > Customize from the dashboard menu.
  6. Click on the Additional CSS option.
  7. Add the following code:

    add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 6 );

  8. Save the changes to the Additional CSS.

This code will remove the the default short description from the location below the product title and price and place above the product title for the single product pages. You may need to adjust the CSS to ensure that the description appears in the desired position.