Apps Ballance Chat Click Code Cog_Wheels Compose_email Conference Contacts Earth Edit_File_1_ Email Email_2 File Folder_2 Gift Group_2 Help ID ID_2 Key Keys Laptop_Store Link Lock Log_Out Map Marketing Navigation Partnership Profile Safe_2 Search_User Secure_Files Settings Share Shield Shield_2 Shopping_Cart Support_Male Trash Type_pin User_female User_male logo copy

Home Forums General Support How can I make the author page redirect to the new profile page?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15914
    chrisdavisberry
    Participant

    Hi,

    I have a couple of uses on the site where the author page was linked to but i would like this to link to the new profile page instead.

    The example code I had (to link to the author page) was:

    <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a>

    Is there an alternative I can use to link to the users profile instead?

    (for example when linking from a post or custom post created by that user)

    Many thanks
    Chris

    #15918
    WP User Manager
    Keymaster

    Hello,

    If you’re comfortable making code changes to your theme you can use this function to create an url to a user profile powered by WPUM https://github.com/alessandrotesoro/wp-user-manager/blob/master/includes/profiles/functions.php#L74

    the function accepts a user object. Example code: https://gist.github.com/alessandrotesoro/8bd4286306d21a094a1d

    Haven’t tested the code but should work.

    #15922
    chrisdavisberry
    Participant

    Hi Allessandro,

    I adapted the second code a little and it worked perfectly.

    Many thanks
    Chris

    (this is resolved)

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Support’ is closed to new topics and replies.