Mike
asked 8 years ago

Hello
This is not a question but Ifound a way to connect the question asker and the answerer to their buddypress profile (hooray it only took me about 3 days!!)
Download and install the BP Blog Author Profile Link plugin – http://wordpress.org/plugins/bp-blog-author-link/
Because questions and answers are actually posts this works well. Also works for comments
Regards
Mike

well wisher
replied 8 years ago

great discovery Mike cheers !!!

Guru
replied 8 years ago

Cheers Mikey!

Mike
replied 8 years ago

I just found an issue. The author name on the main question page does not go to the Buddypress profile. Still gives the 404 when trying to access the ‘Author’ page.

Would be good if we could find a way to change that.

kedinn turpo
replied 8 years ago

paste in functions.php y listo!! 😀 problema solucionado

if(is_author()){
$user_id = get_query_var( ‘author’ );
wp_redirect( bp_core_get_user_domain( $user_id). “/profile/” );
}

kedinn turpo
replied 8 years ago

if(is_author()){
$user_id = get_query_var( ‘author’ );
wp_redirect( bp_core_get_user_domain( $user_id). “/profile/” );
}

Guru
replied 8 years ago

Has any one tried this solution?

Mike
replied 8 years ago

Not yet but will give it a go later and let you know

Guru
replied 8 years ago

yeah, didn’t really work for me, so need to know if its working for others.

Mike
replied 8 years ago

Did you only add the above code or did you change something?

Guru
replied 8 years ago

just added the code above and didn’t touch any thing else

kedinn turpo
replied 8 years ago

Sorry i can not speak english 🙁
use step 4
http://cmspioneer.com/designwall/guide/dw-question-answer-plugin/

add_action( ‘template_redirect’, ‘dw_simplex_redirect_author_archive_to_profile’ );
function dw_simplex_redirect_author_archive_to_profile() {
if(is_author()){
$user_id = get_query_var( ‘author’ );
wp_redirect( bp_core_get_user_domain( $user_id ) );
}
}
change code line 5 :

add_action( ‘template_redirect’, ‘newcporg_redirect_author_archive_to_profile’ );
function newcporg_redirect_author_archive_to_profile() {
if(is_author()){
$user_id = get_query_var( ‘author’ );
wp_redirect( bp_core_get_user_domain( $user_id). “/profile/” );
}
}

Mike
replied 8 years ago

I am assuming that ‘newcporg’ in the code is your template name keddin?

kedinn turpo
replied 8 years ago

yes is my theme
change line 5

well wisher
replied 8 years ago

hi everyone there are plugins available to do this task when i searched on google

Mike
replied 8 years ago

Nearest plugin I have found is the one at the top.

1 Answers
anticancer drug
answered 8 years ago

Here is the top rate Geftinat Suppliers having world Wide shipping of all kinds of life saving drugs and anti cancer medicines. You can easily book your order online and get your drugs dispatched at your doorstep.

Powered by DW Question & Answer Pro