User profile page to display a different page

11.69K viewsCoreprofile
0

Hi Anspress team,

I’m using a plugin to manage user subscriptions and profiles.  It works great with Anspress as expected ;).  However, I would like to be directed to the plugin user profile page as opposed to the Anspress profile page.  Is it possible?  So basically, when I’m on the user page in Anspress and I click on profile, I would like to call a different user profile page than the one defaulted by Anspress.

 

Thank you guys

0
function my_ap_user_link_override($link, $user_id){
     global $userpro;
     return $userpro->permalink($user_id);
}
add_filter('ap_user_link', 'my_ap_user_link_override', 10, 2);

Add this code to your theme function.php

Thank you Rahul,
However, when I add the above code to my theme function.php, the question came all empty, except that I still have the ‘ask question’ button and the different filter. Also, I noticed that my wp admin bar on top of the screen disappeared and becomes all white.

any clue? Am I missing something? apart from the code you pasted above, do I have to add something else in function.php?

This is what Userpro support provided to integrate with any other plugins. I think this could be useful for a lot of Anspress users:

http://userproplugin.com/userpro/integration-guide/

I have updated the code. Try now and let me know.

I think we are pretty close. The user questions are back in, but when I click on the user thumbnail to get to his/her profile, it raises a “error 404” page. When I click on the question link, I can see the following: Warning: Missing argument 2 for my_ap_user_link_override() in /home/sapsul5/public_html/wp-content/themes/jobify/functions.php on line 853

Any thoughts Rahul?

I just updated the code. yesterday I replied from a mobile device so did not ched code properly. Now new code should work.

Thank Rahul, it seems to work like a charm!!! You’re good and always there to help!!! Much appreciated…… Is there a link to donate, I can’t seem to find it

You are viewing 1 out of 3 answers, click here to view all answers.