I wish to use a custom field (business name) for my permalinks, I can set the business name to the permalink but it adds %20, e.g. my%20custom%20thing. Is there a way to remove the %20 and insert a dash instead?
Or is there a way I can get the username to be automatically generated from the business name field?
Or is there way when they type in their own username, that if there are spaces it either removes the spaces or gives a warning that there can be no spaces, only alpha and dashes?
Thanks
This topic was modified 1 year, 6 months ago by GregW.
This topic was modified 1 year, 6 months ago by GregW.
Hi @missveronicatv , just a follow up if possible as I could not get that to work by just adding it to my functions.php file, unless I need to edit it to something else? I have set the Profile Permalink Base to Business_Name but when used it still shows the %20 for spaces in that name.
Is there a way I can get the permalink to use a dash “-” in place of the %20 and validate it is unique, if not unique append a number OR allow user to edit it (the permalink?).
So if my business name is Blue Giraffe, the permalink will be /blue-giraffe, but if someone else then has the same name (very rare) it will be /blue-giraffe-2 or can they edit it to something they want, e.g. blue-giraffe(-bob).
Thanks
P.S. If I need paid support to help me here please let me know. I do have an expired extension I don’t use, but may use again, if I renew will that avail me to the support I need as above?
This reply was modified 1 year, 6 months ago by GregW.
This reply was modified 1 year, 6 months ago by GregW.
This reply was modified 1 year, 6 months ago by GregW. Reason: add more info
No, you can’t use the Business_Name if it’s not unique.
I will add a Permalink setting to the “Unique User Account ID” plugin,
where the meta_key option will give you the unique format required.
@missveronicatv I am not sure you understood my request, or I can’t explain it better.
Initially we had the %20 in the slug, e.g. Business%20Name
That was fixed by converting the spaces (%20) with a dash e.g. business-name
Then if a name contained a non alpha/numeric character )e.g. ‘ )it would remove them, so Lolly’s becomes lollys, but if the full name is Lolly’s Something it now also removes the dashes between the words.
So now we have lollyssomething and not lollys-something
Is there way you could modify this to bring back the dash between the words in a name?