Remove Product Category & Product from URL in WordPress | Custom Permalinks for WooCommerce

Remove Product Category & Product from URL in WordPress | Custom Permalinks for WooCommerce


Remove Product Category & Product from URL in WordPress | Custom Permalinks for WooCommerce

Remove product category from URL in wordpress. Remove product-category base in woocommerce or change product category url in woocommerce. In woocommerce remove parent category from url or how to apply custom permalinks for woocommerce. From your wordpress site if you go to store, and click at any product, in URL we get this text or string named as ‘product’ and if you click a product category, in URL we get product-category before product name. URL should be unique. These identifiers are there in URL to avoid any permalink conflicts. But if your client requires you to remove product and product-category from URLs, he probably knows what is he doing. He is not worried about URLs conflicts. In that case you can go ahead and remove product and product-category from URLs.

To do that, from wordpress dashboard, go to ‘Permalinks’ from ‘Settings’. Here I should mention that category base is post categories base. And product category base is category base for the product categories. Instead of removing these you can also change these by entering alternative
text of your choice there. Below under ‘product permalinks’ you can customize single product URLs. You can choose shop base, shop base with category or custom base in single product urls.

But we are not changing these we are removing ‘product base’ and ‘product category base’ from URLs. To do that under optional in ‘product category base’ type period and save changes.

Then go to ‘theme file editor’ under ‘appearance’. In functions.php file, use the code that I have linked below. Remember, we are not removing product category name from URL. we are removing product-category text or string from URL. Now If I go to store and then single product. There is no product text in URL. And if we click at any product category name, in URL there is no product-category text in URL.

Get the code from following link.
Code
https://github.com/webstylepress/Word

Also if you don’t want to use custom code, there are some SEO plugins and woocommerce customization plugins that allow you to remove product base, tag base, product category base and such from urls.

Now there are many other permalink and URL related tips for wordpress that you may be looking for. These may also help you tremendously. So check these out as well.

- Remove Category and Tag Base from WordPress | WordPress URL Rewriting Tutorial
   • Remove Category and Tag Base from Wor…  

- How to Hide WooCommerce Product | WooCommerce Tutorial | Shop Inventory Management in WordPress
   • How to Hide WooCommerce Product | Sho…  

- Remove Custom Post Type (CPT) Name or Words from URL in WordPress | WordPress Customization
   • Remove Custom Post Type (CPT) Name or…  

- WordPress Tutorials
   • Add Inquiry Form Under Product in Wor…  

- WordPress Plugins
   • How to Add Custom Tabs \u0026 Data in Prod…  

If you are new to the channel, subscribe to learn more about web development, web application development, editing wordpress source code, how to create a website using wordpress, developing landing page in wordpress, working with child theme wordpress, custom wordpress theme development, wordpress plugin development, how to build a website with wordpress, create website with wordpress and related web development areas.

We received following questions:
How do I remove a category from a Permalink?
How do I remove a category from a product page in WooCommerce?
How do I change product category URL in WooCommerce?
How do I remove a product from my URL?
How do I remove unwanted URLs in Wordpress?
So
We have covered those questions and also following topics in this video:
Remove product from url in wordpress
Remove product-category from url in wordpress
Remove product category from url
Remove product from url in woocommerce
Remove product-category from url in woocommerce
Remove product-category and product from URL in wordpress
Remove product base from url in wordpress
Remove product category base from url in wordpress
Remove words from wordpress urls
Customize wordpress permalinks
How to remove product category in woocommerce
How to remove category from url in wordpress
How to create custom permalinks in wordpress

Thank You!
👍 LIKE VIDEO
👊 SUBSCRIBE
🔔 PRESS BELL ICON
✍️ COMMENT

⚡Channel:    / @webstylepress  
⚡Website: https://www.webstylepress.com
⚡FaceBook: https://www.facebook.com/webstylepress
⚡Twitter: https://twitter.com/webstylepress
⚡GitHub: https://github.com/webstylepress
#woocommerce #WordPress #WordPressTutorial #WordPressTraining #WordPressForBeginners #WebDevelopment #WordpressDeveloper #WebStylePress #permalink #urlrewriting


Content

0.63 -> welcome to webstylepress
1.63 -> from a WordPress site if you go to store and click at a new product
5.29 -> any URL we get this text or string named as product and if we click at product
19.78 -> category
20.78 -> and URL we get product Dash category before product name URL should be unique
34.77 -> these rectifiers are there in url to avoid any permanent conflicts but if
40.1 -> your client requires you to remove product and product category from URLs
44.33 -> he probably knows what is he doing he is not worried about URL conflicts in that
49.66 -> case you can go ahead and remove product and product category from URLs in this
54.36 -> video we will look into that but before that give this video a like subscribe to
58.39 -> the channel if you haven't already because I am bringing you similar
61.94 -> content on this topic okay so to do that from WordPress dashboard go to
67.69 -> permalinks under settings
70.22 -> and here we have got permanent structure under optional category base tag base
78.78 -> product category base product tag base product attribute base
83.86 -> product permalinks default shop based shop base with category and custom base
88.78 -> here I should mention that category base is post categories based
97.17 -> and product category base is category based for product categories instead of
102.009 -> removing these you can also change these by entering alternative text of your
107.68 -> choice here and below under product permalinks you
113.39 -> can customize single product URLs you can choose shop base shop base with
118.57 -> category or custom base for single product urls
128.55 -> but we are not changing these we are removing product base and product
132.709 -> category based from URLs so to do that under optional in product category base
139.269 -> instead of product Dash category type period
146.84 -> save changes
147.84 -> then go to theme file editor under appearance
158.019 -> open functions.php file
162.4 -> paste this code function wsp remove slug add filter
168.87 -> post type link wsp remove slug and here you see we have product slash
176.05 -> and then function change select structure
181.72 -> so this is to remove product from permalink or URL in WordPress to remove
186.92 -> broad category text from URL use this code
192.61 -> here one thing to remember that we are not removing product category name from
196.97 -> URL we are removing product Dash category text or string from URL update
202.819 -> file now if we go to store
211.51 -> and click it in a single product
216.78 -> there is no text or string named as product in the URL and if we click add
222.13 -> product category name
223.19 -> endurl there is no product category or product Dash category text in the URL
231.939 -> I will link the URL for the code in video description
236.25 -> here I should mention this as well that there are some Su plugins and
241.65 -> woocommerce customization plugins that allow us to remove product based tag
246.42 -> base per category base and similar stuff from urls
250.1 -> and also there are many other permalink and URL related tips for WordPress that
255.549 -> you may be looking for I will also link those tutorial in description that may
260.52 -> also help you tremendously so check those out as well okay I hope it helped
265.71 -> like share subscribe and I will see you in the next video

Source: https://www.youtube.com/watch?v=DydPH52-Ha4