Customize User Custom Meta Slug
The code snippet provided in this article will guide you in customizing the user's custom meta slug. It generates slug in the following format:
{First Name}-{First letter of Last Name}~{hash}
Example: first-l~5rfda
for user with FName = First and LName = Last
To configure the Profile Permalink Base with a Custom Meta, follow these steps:
- Navigate to wp-admin.
- Go to UM (Ultimate Member) > Settings.
- In the General section, click on the Users tab.
- Select Custom usemeta in the Profile Permalink Base option.
- In the "Profile Permalink Base Custom Meta Key" field, enter your desired custom meta key.
- Ensure that the selected custom meta key is set as a required field for all users.
For further information, please refer to the article linked here.
WARNING: We have created this code example to provide guidance and to make it easier for you to implement this code into your website. However, we are not able to provide any support when it comes to customizing the plugin. If you need help implementing this code, please hire a developer.
Note: You can add the code snippet to your theme's functions.php file or use the Code Snippets plugin.