Thanks to a new integration with WPCode, you can now use All in One SEO (AIOSEO) to enable WooCommerce product attributes in search results.
This customization option appears as a code snippet inside the new AIOSEO code library
In this tutorial, you’ll learn how to enable these product attributes.
In This Article
What are WooCommerce Product Attributes?
WooCommerce product attributes are features of products, such as size, color, material, brand.
When displayed on your website, visitors can use attributes to filter results. This provides improved navigation.
Why Enable WooCommerce Product Attributes in Search Results?
Enabling product attributes to appear in search results encourages click-throughs.
When searchers can see details of your product(s) in search results pages, interested shoppers will be likelier to visit your site.
Now let's walk through the simple steps to getting your WooCommerce product attributes displaying in search results.
Step 1: Download All in One SEO (AIOSEO)
First, if you haven’t done so already, download and install All in One SEO (AIOSEO).
After you’ve uploaded the plugin to your WordPress site, a setup wizard will open and walk you through a few steps.
All in One SEO is an established plugin with thousands of 5-star ratings on WordPress.org. Currently, over 3 million people are using the plugin.
Step 2: Navigate to the Code Snippet Library
Next, in the WordPress admin bar, go to AIOSEO » Tools » Code Snippets
If you don’t already have WPCode installed, you’ll see a prompt to install it. You can get the plugin for free.
Now, you’ll see the code snippets.
Currently, there are 23 code snippets to choose from. And we’ll continue to add more.
For our tutorial, we’re using the snippet labeled Enable WooCommerce Product Attributes in Search Appearance.
This code snippet will enable product attributes like size, color, inventory, and material to be displayed in search results.
To get started, click the blue Use Snippet button. That will open a new window.
Note: If you’ve previously clicked on that button, it will read Edit Snippet instead of Use Snippet. Click it either way.
Step 3: Activate the Snippet
Now, in the upper right,
- Toggle the Inactive button to Active.
- Click Update.
That’s all you need to do. The code snippet is now active.
To deactivate a code snippet, simply toggle the button back to Inactive and click the blue Update button again.
Insertion Options
Directly below the code pane pictured above are insertion options.
Here, you can choose to auto-insert the attributes everywhere, or you can customize where and under what conditions you want them to appear.
For instance, you can select a calendar date range to control when they appear.
How to Access AIOSEO Code Snippets in WPCode
You can also access the WooCommerce code snippet directly from WPCode.
If you have WPCode installed, go to WPCode » Library.
You’ll see a button at the bottom left for AIOSEO’s code snippets.
Click it and select the snippet of your choice.
Do Rich Results Always Display in Search Pages?
You can't force search engines to display search results in a specific way.
Search engines decide, on a per-search basis, whether to display rich results.
This depends on many factors, including internet speed. For instance, searchers with slow internet speeds may be served search results without rich features.
However, even if rich results for a page don’t always display or display for all users, the code behind the page helps Google and other search engines understand your content better and rank it for relevant queries.
What’s Next?
Now you know how to customize All in One SEO by adding WooCommerce product attributes to search results.
Next, learn how to add product review schema to your pages so ratings and reviews display in search results. Explore how to harmonize your email marketing and SEO to boost revenues. And discover 3 ways to improve your WooCommerce SEO.
Then subscribe to our YouTube Channel. We publish fresh content each week. And come join us on X (Twitter), LinkedIn, or Facebook to stay in the loop.
Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. We only recommend products that we believe will add value to our readers.