WooCommerce comes packaged with archive pages and loops that make the WooCommerce product description display awesome.
Yet here and there, you may need to show more data on your main shop and other archive pages.
So, here’s a tutorial demonstrating how to show a product description in WooCommerce to archive pages and display it below the product title.
Already Have a WooCommerce Store: Consider Migrating It to Cloudways!
Just a heads up – if you have a WooCommerce store in place already, consider migrating it to Cloudways. Why?
- Dedicated Tech Stack: A dedicated and optimized hosting stack for WooCommerce so that your store reliably loads fast. Always!
- Highly Scalable: A managed hosting platform that’s ready to handle traffic surges, so scalability for your store is a big plus. Never face store crashes again because of limited scalability.
- Automation Options: Amazing store management with SafeUpdates – Cloudways offers a plugin that’ll update your WordPress plugins and even backtest them so that they are working fine. If there’s an issue, the plugin will safely take your plugin to the previous version that’s safe to use.
- Great features and add-ons: Discounted Cloudflare, built-in caches, SSL certificates, etc. – advanced security and reliable hosting for your store.
There’s a lot more that can help you up your WooCommerce game when you choose Cloudways. Now that you have sorted your store’s hosting issues, let’s learn how to display product descriptions for your WooCommerce stores.
Migrating to Cloudways Is Absolutely Free!
Bring your WooCommerce store to Cloudways with a simple plugin & enjoy top-notch security, fast speed, 24/7 support, and 99.99% uptime!
Why Are WooCommerce Product Descriptions Important?
Simple answer? They are there to help you turn visitors into customers.
But that’s a very simplified answer. There’s a lot more than goes behind product descriptions, which is why they are so important. Let’s see some points why that’s the case.
1. SEO Requirements: Optimized and well-written product descriptions are crucial if you want your store to rank for your targetted keywords. Without optimized descriptions, your visitors and search engines will be equally confused about what you sell.
2. Getting Targeted Traffic: In line with the SEO requirements, your product descriptions are important to attract the right kind of audience. Unoptimized keywords will bring in garbage traffic to your website, which will basically be of very little help to your business.
3. Creating Product Awareness: Many people will visit your store with an exploratory mindset. Your job is to communicate exactly what you sell to make them more aware of your products. And, hopefully, they’ll make a purchase. Or return back when they need something you sell.
4. Showcasing your USPs: Uniqueness sells. If you can mention your USPs in the product descriptions, you’ll make your products stand out from others. That’ll improve your chances of getting more conversions.
5. Satisfying Customer Intent: Great product descriptions compel people to buy your product. That’s the ultimate goal you want to achieve, which will serve your business the best.
So, there are ample reasons to focus on product descriptions for your WooCommerce stores. Now let’s review the methods you can use to have them
for your stores.
Drive Your WooCommerce Store’s Growth with Autonomous
Effortlessly display product descriptions and keep your WooCommerce store performing at its best. Benefit from automatic scaling, enhanced security, and superior speed without any configuration hassles.
Method 1: Add Product Descriptions via WordPress CMS
You can add product descriptions from the WordPress backend. Here’s how you do it.
- Go to WooCommerce and then select products.
- Add a new product or select the one that already exists in your store. Click edit, and you’ll enter the window where you can play around with descriptions.
- Enter the product name and description.
- You can scroll down to add further details and short product descriptions.
- Once done, click update. If it’s a new product, click publish.
And that’s all. Now let’s explore the next method.
Method 2: Create a WooCommerce Product Description Plugin
In your wp-content/plugins directory, create a PHP file with the name cloudways-product-shor-des.php
Open the file in your code editorial manager. At the top of the file, including this:
<?php /* * Plugin Name: Cloudways Display WooCommerce Product Short Description * Description: Add WooCommerce product short description to the loop in product archive pages * Version: 1.0 */
This sets up the plugin and gives WordPress all that it needs to activate it.
Now go to the Plugins area in the WordPress admin area and find the plugin:
Now Activate the WooCommerce product description plugin.
At first, it won’t have any effect as you haven’t populated it. This is what the shop page looks like right at this point:
– Image from Avada
Below are the 3 functions that you can perform using your plugin:
1. Function to get short descriptions in WooCommerce
The short description for products in WooCommerce utilizes the excerpt that you’d find in normal posts. So to show it, you should simply show the excerpt for the post.
In your plugin file, add the code to get product description WooCommerce:
function cloudways_short_des_product() { the_excerpt(); }
It’s as basic as that! Yet, now you have to hook your function to the right activity so that it’s output in the correct place in your archive pages.
Managed WooCommerce Hosting Starting from $10/month.
Create, manage, and customize your WooCommerce store with complete freedom.
2. Function Hook for Correct Action to add WooCommerce short description
How about we investigate the file in WooCommerce that output the content of the loop on archive pages? This file is content-product.php, and you’ll see it in the templates folder in the WooCommerce plugin by using the WooCommerce product description hook. The file incorporates various action hooks, all of which are utilized by WooCommerce to output different content.
As we need to show our excerpt below the title of the product, the hook we have to utilize is woocommerce_after_shop_loop_item_title . As you can see from the content-product.php file, it’s now got two functions attached to it, woocommerce_template_loop_rating() and woocommerce_template_loop_price(), which have priorities of 5 and 10 separately. So we need to hook our function with a higher priority number, to ensure it fires after those. I’ll leave some leeway and use 40 as the priority.
Beneath your function, add this:
add_action( 'woocommerce_after_shop_loop_item_title', 'cloudways_short_des_product', 40 );
Now the complete WooCommerce description code becomes:
function cloudways_short_des_product() { the_excerpt(); } add_action( 'woocommerce_after_shop_loop_item_title', 'cloudways_short_des_product', 40 );
Now save your plugin file and refresh the shop page in your browser.
– Image from Avada
These descriptions are a bit long. To reduce the content length, add the following code in your functions.php located at theme folder.
function get_ecommerce_excerpt(){ $excerpt = get_the_excerpt(); $excerpt = preg_replace(" ([.*?])",'',$excerpt); $excerpt = strip_shortcodes($excerpt); $excerpt = strip_tags($excerpt); $excerpt = substr($excerpt, 0, 100); $excerpt = substr($excerpt, 0, strripos($excerpt, " ")); $excerpt = trim(preg_replace( '/s+/', ' ', $excerpt)); return $excerpt; }
$excerpt = substr($excerpt, 0, 100); where 100 is character limit. you can manage content length by increasing and decreasing its value.
Further, replace the following function
the_excerpt();
by
echo get_ecommerce_excerpt();
in your plugin file having name cloudways-product-shor-des.php
Now save your plugin file and refresh the shop page in your browser.
– Image from Avada
3. Get WooCommerce product description by product_id
By the following code you can get WooCommerce product description or the product object using product ID
$order = wc_get_order($order_id); foreach ($order->get_items() as $item) { $product_id = $item['product_id']; $product_details = $product->get_data(); $product_full_description = $product_details['description']; $product_short_description = $product_details['short_description']; } By using wc_get_product, get_description() and get_short_description() $order = wc_get_order($order_id); foreach ($order->get_items() as $item) { $product_id = $item['product_id']; $product_instance = wc_get_product($product_id); $product_full_description = $product_instance->get_description(); $product_short_description = $product_instance->get_short_description(); }
Wrapping up!
Displaying your product descriptions is crucial for your store.
With the right placement and optimization of your WooCommerce product descriptions, you can get better growth for your stores. Along with that, having a reliable hosting WooCommerce setup ensures your product pages load quickly and perform smoothly, enhancing the overall user experience.
You now know the methods of adding a product description in WooCommerce. It’s time to roll up your sleeves and get to creating some amazing descriptions for your products.
Q. How do I get product descriptions in WooCommerce?
A. There are 2 ways to get the product descriptions for your WooCommerce stores:
- By using the WordPress CMS
- By creating a plugin or by installing a paid plugin
Q. What is the product description function in WooCommerce?
A. Product description function in WooCommerce allows you to display product descriptions on your WooCommerce shops and product pages.
Q. What is a product description?
A. Product description is the explanation written somewhere around the product that explains exactly what the product is.
Q. What is the shortcode for product description in WooCommerce?
A. You can use [product_short_description id=”YOUR_PRODUCT_ID”] as the shortcode for creating product descriptions in WooCommerce.
Q. How to get WooCommerce product description?
A. You can get the WooCommerce product description using the get_the_content() or $product->get_description() function in PHP templates.
Q. How do I enable product description in WooCommerce?
A. Product descriptions are enabled by default in WooCommerce. If they’re not visible, check your theme settings or ensure the product description tab is enabled under WooCommerce settings.
Q. How do I add a description in WooCommerce?
A. To add a description, go to Products > Edit Product in the WordPress dashboard and fill in the “Product Description” field under the product editor.
Q. How to edit product description in WooCommerce?
A. To edit a product description, navigate to Products > All Products, select the product, and modify the “Product Description” field in the editor. Save changes once done.
Owais Khan
Owais works as a Marketing Manager at Cloudways (managed hosting platform) where he focuses on growth, demand generation, and strategic partnerships. With more than a decade of experience in digital marketing and B2B, Owais prefers to build systems that help teams achieve their full potential.