• How do I add a second base to the profile permalink? For example, I want to use first name + last name as my base for SEO and readability, but this alone is not unique (I could have two users with the same name), so I want to add the user ID as well.

    /profile/[user id]/[firstname]-[lastname]

    I found these two hooks, but I don’t think they’re what I need as when I implement either one, it doesn’t change the user’s profile URL:
    my_um_profile_permalink
    my_um_external_profile_url

    Any help would be appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jdowns1

    (@jdowns1)

    Correction, the filters I’ve tried to use are
    um_profile_permalink
    um_external_profile_url

    where $slug is configured to the user-id

    function my_um_profile_permalink( $profile_url, $page_id, $slug ) {
       $first_name = um_user('first_name');
       $last_name = um_user('last_name');
       $profile_url .=  $slug . '/' . $first_name . '-' . $last_name; // replace to your custom link.
    }
    add_filter( 'um_profile_permalink', 'my_um_profile_permalink', 10, 3 );
    • This reply was modified 1 year, 4 months ago by jdowns1.
    Thread Starter jdowns1

    (@jdowns1)

    Any help or suggestions from anyone?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a Second Profile Permalink Base’ is closed to new replies.