Vendor slug in product URL

WCMp Core

Tagged: , ,

Resolved
Viewing 3 reply threads
  • Author
    Posts
    • #125612
      Kevin
      Participant

      Is it possible to get the vendor slug in the product URLs?

      Many of my vendors create very similarly named products and it would help a lot to have the vendor slug in the product URLs to differentiate between the products.

      Current product URL: https://marketplace.com/product/product-name
      Wanted product URL: https://marketplace.com/vendor-slug/product-name

      Best regards

    • #125755

      Hello @kevin , thank you for reaching out to us .
      The product slug comes from WooCommerce, by default they don’t support the vendor’s name.
      Now, you can modify this slug as per your need but for this you have to do custom code.
      For the coding procedure if you have any developers, ask them to contact us so we can help you out.

    • #126045
      Kevin
      Participant

      It would be great if the feature could be implemented in the plugin as an update!

      Anyway, I am the developer on the webshop. Where should I contact you to initiate this?

    • #126069

      Hi,
      As per your requirement you have to follow 2 steps –

      step 1 : Go to wp-admin >> Settings >> Permalinks, under Product permalinks section choose Custom base and input as per your Permalink requirement.

      step 2: add custom code using below filter to change the product permalink –

      post_type_link
      Copy

      then you have to rewrite rules using below function

      add_rewrite_rule()
      Copy

      and add this init hook.

      Regards,

Viewing 3 reply threads

The topic ‘Vendor slug in product URL’ is closed to new replies.