Change usernames to random numbers in vendor URLs

I would like to prevent that people choosing a stupid username will get it hardlinked at their profile. So I would like to change hp_vendor=username to hp_vendor=randomnumber or anything else anonymous or at least well chosen.
How to do this?

Unfortunately there’s no way to prevent this because usernames are unique in WordPress, this ensures that vendor URLs are also unique. If you use a custom attribute as a vendor name in HivePress/Settings/Vendors it’s also be used in the URL, instead of the username.

Setting a random number may be possible, but requires code customizations, here’s where the username is saved as the vendor slug hivepress/class-vendor.php at master · hivepress/hivepress · GitHub

If you have the default URL structure like “?hp_vendor=username” I highly recommend choosing a custom one in Settings/Permalinks, any structure with %postname% will be better for SEO.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.