how to enable woocommerce product attributes

How to Enable WooCommerce Product Attributes in Search Results

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.

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.

aioseo homepage

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.

aioseo code snippet library

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.

aioseo enable woocommerce product attributes

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,

  1. Toggle the Inactive button to Active.
  2. Click Update.
edit woocommerce product snippets

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 for woocommerce product attributes

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.

wpcode aioseo code snippets

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.

Want to Try AIOSEO for Free?

Enter the URL of your WordPress website to install AIOSEO Lite.

Please enable JavaScript in your browser to complete this form.

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.

author avatar
Sherrie Gossett Content Writer
Sherrie is an SEO analyst based in New Hampshire in the United States. When she’s not busy researching, implementing, and writing about new SEO developments, she can be found hiking and playing guitar.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.