Replies
Thank you @nikb for the kind words. I am glad that I could help.
Regards
Ravi- Ravi on April 11, 2018 at 8:11 pm in reply to: Buddypress Force follow 5 members after registration #14411
Hello Tosin,
Thank you for posting. Please use the following code in your “bp-custom.php” file.
function buddydev_check_or_redirect() { if ( ! function_exists( 'bp_follow_get_the_following_count' ) || ! is_user_logged_in() || is_super_admin() ) { return; } $fp_active = class_exists( 'BD_Force_User_Avatar_Helper') ; $is_dir = bp_is_members_directory(); // if we are on directory and force profile is not active // return. if ( $is_dir && ! $fp_active ) { return ; } $follow_count = bp_follow_get_the_following_count( array( 'object_id' => get_current_user_id() ) ); if ( $follow_count >= 5 ) { return; } if ( $is_dir && $fp_active ) { remove_action( 'bp_template_redirect', array( BD_Force_User_Avatar_Helper::get_instance(), 'check_or_redirect' ), 1 ); return; } bp_core_add_message( __( 'Please follow atleast 5 people to continue.' ), 'error' ); bp_core_redirect( bp_get_members_directory_permalink() ); } add_action( 'bp_template_redirect', 'buddydev_check_or_redirect', 0 );if No message is showing. Place the following code below above mentioned code
function buddydev_show_notices() { do_action( 'template_notices' ); } add_action( 'bp_before_directory_members', 'buddydev_show_notices' );Please let me know if it works or not.
Thank You
Ravi Hello NikB,
Thank you for posting. Please try the following code in “bp-custom.php” file.
function buddydev_remove_ajax_read_more_activity_link( $excerpt, $text, $append_text ) { $excerpt = str_replace( 'activity-read-more', 'excerpt-read-more', $excerpt ); return $excerpt; } add_filter( 'bp_activity_truncate_entry', 'buddydev_remove_ajax_read_more_activity_link', 10, 3 );Thank You
Ravi- Ravi on April 10, 2018 at 9:08 am in reply to: [Resolved] Editable Activity not work when write activity & upload image #14382
Hello Julia,
Sorry, Plugin does not support anything other than normal activity and comment.
Thank You
Ravi - Ravi on April 1, 2018 at 1:24 am in reply to: [Resolved] BP profile visibility redirec option. #14195
Hello Julia,
Thank You for acknowledgement. Use the following code.
function buddydev_members_directory_redirect() { if ( bp_is_members_directory() && ! is_user_logged_in() ) { bp_core_redirect( get_home_url() ); } } add_action( 'bp_template_redirect', 'buddydev_members_directory_redirect' );Thank You
Ravi - Ravi on March 31, 2018 at 1:40 am in reply to: [Resolved] BuddyPress Simple Front End Post Warnings In Code #14183
Hello Dime,
Thank you for posting. Please let me know if you using the plugin individually or with “BuddyBlog” or “Blog categories for group”?. If yes, are you dealing with custom taxonomy.
Thank You
Ravi - Ravi on March 31, 2018 at 1:24 am in reply to: [Resolved] BP profile visibility redirec option. #14182
Hello Julia,
Please use the following url in your “bp-custom.php” file to redirect user on home page.
function buddydev_redirect_user_on_restricted_profile( $location ) { $location = get_home_url(); // For home url return $location; } add_filter( 'bp_profile_visibility_redirect_location', 'buddydev_redirect_user_on_restricted_profile' );Regards
Ravi Hello Daniel,
Thank you for the acknowledgement.
Hello Julia,
Yes, It is good to have like that. But it is not feasible for “edit profile” in current BuddyPress eco system. It can be doable for other subnav menu like “change-avatar”, “change-cover”.
Thank You
RaviHello Daniel,
Yes, It was a bug with “BuddyBlog” plugin. I have updated the plugin. Please download the latest version of the plugin. You can download the plugin from the following url
https://buddydev.com/plugins/buddyblog/
Thank You
Ravi