WordPress.org

Ready to get started?Download WordPress

Forums

Edit Author Slug
[resolved] retrieving user info using author slug (2 posts)

  1. Joe
    Member
    Posted 1 year ago #

    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-

    http://wordpress.org/extend/plugins/edit-author-slug/

  2. Joe
    Member
    Posted 1 year ago #

    OK - ugrrh - It is nicename - I got it - thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags