Support may delay or unavailable May 24 2020 to May 30 2020 for holy Eid vacation.

How to link profile to post author?

Support reply may delay for 3 weeks due to corona virus outbreak, please send us email to support@pickplugins.com
0
hello8
Sep 10, 2018 10:44 PM 1 Answers General
Member Since Jul 2017
Subscribed Subscribe Not subscribe
Flag(0)

Hi. Love the profile plugin. Whichever user is logged in can access their profile by clicking on the page link in menu. But when other users click on the author of a post it does not take them to the authors profile. Have tried changing code in function.php

add_filter( 'author_link', 'change_author_link', 10, 1  );

  function change_author_link($link) {
   $username=get_the_author_meta('user_nicename');


  $link = 'http://ellie-mae.com/buzz/profile' . $username;
   return $link;
 }

Also tried changing 'username' to 'id' but still no luck.

Any idea how i can get the 'author' linked to their profile please?

Many thanks

2 Subscribers
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
PickPlugins
Sep 10, 2018
Flag(0)

Welcome to our forum.

Can you please try following code and let me know the result.

add_filter( 'author_link', 'change_author_link', 10, 1  );

function change_author_link($link) {
  $userID =get_the_author_meta('ID');
  $link = 'http://ellie-mae.com/buzz/profile?id=' . $userID ;
  return $link;
 }

Regards

PickPlugins
- Sep 11, 2018 06:53 PM
Flag (0)
0

Glad to know that its work. if you love the plugin and our support please submit us five star reviews.
https://wordpress.org/plugins/user-profile/#reviews

Regards

hello8
- Sep 11, 2018 02:13 PM
Flag (0)
0

Hi. works perfect! Great plugin & support. Thankyou

Sign in to Reply
Replying as Submit

Please use https://imgur.com/upload to upload your screenshot and share url here.
You can't upload any files or attachment to our server directly for security reason, you can use 3rd party website and share file url here. here is the top file sharing website you can use.

Please login to see your tickets