How To Remove Product-Category Slug In Woocommerce

WooCommerce is a widely used e-commerce solution that enables the setup of an online shop for selling goods. A useful functionality within WooCommerce is its product categorization feature. Nonetheless, at times, there may be a need to eliminate the category slug from your product page URLs. In this guide, we’re going to walk you through the steps to accomplish exactly that.

Why Remove the Category Slug?

There are several reasons why you might want to remove the category slug from your product URLs. One reason is for SEO purposes. By removing the category slug, you can create a more concise and keyword-rich URL that can help improve your search engine rankings.

How to Remove the Category Slug

To remove the category slug from your product URLs, you will need to make some changes to your WooCommerce settings. Here are the steps you can follow:

  1. Log in to your WordPress dashboard and go to WooCommerce > Settings.
  2. Click on the Products tab and then click on the Display tab.
  3. Scroll down until you see the “Shop Page URL” section. In this section, you will see an option called “Category Base.” This is where you can remove the category slug from your product URLs.
  4. By default, the Category Base is set to “category.” To remove the category slug, simply change it to an empty string (i.e., leave it blank).
  5. Save your changes and you’re done! Your product URLs should now be without the category slug.

Conclusion

Removing the category slug from your product URLs can help improve your SEO and make your URLs more concise. By following the steps outlined in this article, you can easily remove the category slug from your WooCommerce product pages.