[Plugin: Edit Author Slug] retrieving user info using author slug
-
My issue is as follows:
I am modifying the page author.php and its base. /author/* to profile/*.
In author.php I need to retrieve the user information according to the parameter passed or logged in user.
The $current_user doesn’t offer $current_user->user_slug
How can I access the author slug so that I can build my link and retrieve the user’s info according to its slug?
For example, I have the following in a function inside functions.php:
———$wp_admin_bar->add_node( array(
‘id’ => ‘myprofile’,
‘title’ => ‘View Your Profile’,
‘parent’ => ‘my-account’,
‘href’ => ‘/profile/’.$current_user->user_login,————
I need to make somehow check the slug and compare it to the link passed to determine who’s the author/user.
Thank you for your help.
Joe-https://www.ads-software.com/extend/plugins/edit-author-slug/
- The topic ‘[Plugin: Edit Author Slug] retrieving user info using author slug’ is closed to new replies.