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

Sdílet
Vložit
  • čas přidán 3. 12. 2022
  • 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
    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 Ta...
    - How to Hide WooCommerce Product | WooCommerce Tutorial | Shop Inventory Management in WordPress
    • How to Hide WooCommerc...
    - Remove Custom Post Type (CPT) Name or Words from URL in WordPress | WordPress Customization
    • Remove Custom Post Typ...
    - WordPress Tutorials
    • Add Inquiry Form Under...
    - WordPress Plugins
    • How to Add Custom Tabs...
    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: www.webstylepress.com
    ⚡FaceBook: / webstylepress
    ⚡Twitter: / webstylepress
    ⚡GitHub: github.com/webstylepress
    #woocommerce #WordPress #WordPressTutorial #WordPressTraining #WordPressForBeginners #WebDevelopment #WordpressDeveloper #WebStylePress #permalink #urlrewriting

Komentáře • 18

  • @mett978
    @mett978 Před 4 měsíci

    Yooooooooooooo! Thank you! Thank you so much! Spent too long trying to figure it out and would probably not have figured it out without your video. Thank you :)

  • @oshivski2124
    @oshivski2124 Před rokem +1

    Thank you. Very helpful

  • @criativagenciamarketingpub745
    @criativagenciamarketingpub745 Před 10 měsíci +1

    Thank you so very much for help us

  • @roket61
    @roket61 Před 8 měsíci +1

    thank you bro🚀

  • @dimitramavroeidis1314
    @dimitramavroeidis1314 Před 10 měsíci

    Hello, it works only for the 1st category and the 1st subcategory. After that, if I have 2nd and 3rd subcategory I have 404 error. Can fix this?

  • @delacleautournevis
    @delacleautournevis Před 11 měsíci

    hello i need write accent in my slug permalinks in whordpress, but wordpress block it, with this plugin or with you solution is its possible to do it please ? thanks yann

  • @harshaldave9775
    @harshaldave9775 Před měsícem

    I applied the code in theme in child theme as well but not working The URL is as it is.

  • @ThiagoF.Pereira
    @ThiagoF.Pereira Před rokem

    Thanks for the video, it helped me a lot!!!
    And to remove or hide the product-tag from the url?
    For example, I made a page to show only products with the tag "for the summer", but I didn't want the "product-tag" to appear in the url, how do I remove or hide it from the url? Could you tell me, please?
    Thank you very much and congratulations again for the video

  • @navaneethakrishnan3871
    @navaneethakrishnan3871 Před 6 měsíci

    Thanks a lott.

  • @Nebelung8
    @Nebelung8 Před 5 měsíci

    The product-category slug at my product categories is removed, worked! That’s what I’ve been looking for, thanks!🙏🏼
    Edit: does it affect SEO?

  • @UmwMedia
    @UmwMedia Před 7 měsíci

    but when i search product with product slug its working

  • @bouhaddouerrdid8497
    @bouhaddouerrdid8497 Před 7 dny

    It works ;)

  • @FaithBiete
    @FaithBiete Před rokem

    I have to re-add the code every time I update the theme. Is there a permanent solution?

    • @webstylepress
      @webstylepress  Před rokem +1

      Are you adding code in the theme files? If so, I recommend you to use child theme or use a plugin to add code to theme.

  • @wescalona
    @wescalona Před rokem +1

    Hello, it would be great if you activate the subtitles function on CZcams, you would help the Hispanic community

    • @webstylepress
      @webstylepress  Před rokem

      I will do that from now on. I stopped it because I was not sure if it was helping or not.
      Subtitles are auto-generated by youtube and sometimes these have mistakes. That is why I turned those off.
      Thank you for bringing my attention to it.
      I will turn on subtitles, but plz keep in mind that these may have a few misspelled words and mistakes because it's mostly auto-generated.