• Resolved walid91

    (@walid91)


    Hi,

    I would like to know if it is possible to replace the title of a product with an ID code or ID number, I don’t know how to say it.
    Example: mywebsite.com/products/smartphoneX11
    In: mywebsite.com/products/625790
    In an automatic way.
    If possible without plugins by adding a php filter.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    I would like to know if it is possible to replace the title of a product with an ID code or ID number…
    …If possible without plugins by adding a php filter.

    Yes, this is possible, but that would need a lot of time if there are many products to be updated. You can edit the product (on the product edit screen) and edit the Slug.


    Link to image: https://snipboard.io/ZqQmMV.jpg

    You will see a result like this one:

    Link to image: https://snipboard.io/ZF71OA.jpg

    Let us know if you have any questions.

    Thread Starter walid91

    (@walid91)

    Hi,

    Thank you for responding.
    Indeed, I know this method.
    My site is a classified ad site, I will not be able to edit each product manually, it would take me a lot of time.
    That’s why I ask if it is possible to edit the slug automatically.
    Thank you for your help.

    Hello,

    I understand what you are saying, there is a workaround, you can add slugs to the importer, then you can import the product slugs in bulk to your site:
    https://github.com/poxrud/WooSlugImporter

    I hope this points you in the right direction.

    Thread Starter walid91

    (@walid91)

    I honestly didn’t understand how it works.
    I managed to configure the permalinks as I wanted.
    Settings > Permalinks > Product permalinks
    Custom base > https://mywebsite.com /%category%/%post_id%/
    What I got:
    https://mywebsite.com/electronics/laptop/6641/laptopx3/
    But I don’t want the product title laptopx3!!!!
    How to remove it ???

    Thank you for your help.

    Hi @walid91

    Can you please share with us a screenshot of your Permalink settings? So that I can try to reproduce the issue on my testing site?

    You can send it via https://snipboard.io – please follow the instructions on that page, then paste the URL in this thread.

    We’ll look forward to hearing from you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘change slug’ is closed to new replies.