- InactiveLevel: EnlightenedPosts: 28
Please I inserted this code to my buddypress user home
This code output the follow button anything I click on the button it out put an error
<?php else: ?>
<?php
if ( function_exists( ‘bp_follow_add_follow_button’ ) ) :
if ( bp_loggedin_user_id() && bp_loggedin_user_id() != bp_displayed_user_id() ) {
bp_follow_add_follow_button( array(
‘leader_id’ => bp_displayed_user_id(),
‘follower_id’ => bp_loggedin_user_id()
) );
}
endif;
?>Help need
Hi Adeala,
In order to allow us assist you, Please share complete code over pastebin.com and link here.
Also, please link to a screenshot showing the error.Thank you
Brajesh- InactiveLevel: EnlightenedPosts: 28
You were back quoting the strings.
I have simplified it and used the correct quotes.
if ( function_exists( 'bp_follow_add_follow_button' ) ) : if ( is_user_logged_in() && bp_is_user() && ! bp_is_my_profile() ) { bp_follow_add_follow_button( array( 'leader_id' => bp_displayed_user_id(), 'follower_id' => bp_loggedin_user_id() ) ); } endif;
Regards
BrajeshPS:- Please do not copy from email replies. Copy from the forum post here.
- InactiveLevel: EnlightenedPosts: 28
I got this error anytime I click on follow button
Deprecated: Function create_function() is deprecated in /home2/insideca/public_html/wp-content/plugins/buddypress-followers/_inc/bp-follow-widgets.php on line 113
Hi Adeala,
You are using an older version of the plugin.Please download it from here.
https://github.com/buddydev/buddypress-followers
It is our fork of the original(no changes currently). We plan to cleanup and pus it or wp.org soon.
Regards
Brajesh
You must be logged in to reply to this topic.