BuddyDev

Search

I need help with follow plugin

  • Inactive
    Level: Enlightened
    Posts: 28
    Kikismedia on #33472

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #33486

    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

  • Inactive
    Level: Enlightened
    Posts: 28
    Kikismedia on #33488
  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #33500

    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
    Brajesh

    PS:- Please do not copy from email replies. Copy from the forum post here.

  • Inactive
    Level: Enlightened
    Posts: 28
    Kikismedia on #33514

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #33517

    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.

This topic is: not resolved