Replies
- Tosin on February 23, 2019 at 10:19 pm in reply to: [Resolved] Hide BuddyPress members directory from non logged users(non members) #21098
I think I found a solution I got it to work for both members directory page and single members page with this code.
/** * Hide Members Directory and single members page from non members(not logged in users) */ function buddydev_hide_members_directory_for_non_members() { if ( bp_is_members_directory() || bp_is_user() ) { if (!is_user_logged_in() ) { bp_core_redirect( bp_get_signup_page() ); exit; } } } add_action( 'bp_template_redirect', 'buddydev_hide_members_directory_for_non_members' );
Any feedback on this question thanks
- Tosin on February 12, 2019 at 8:28 pm in reply to: [Resolved] Auto delete "Users" buddypress notifications after 60 days #20871
Thank you very much I just downloaded the plugin now
- Tosin on February 11, 2019 at 4:02 pm in reply to: [Resolved] Auto delete "Users" buddypress notifications after 60 days #20830
Any feedback sir thanks
- Tosin on February 10, 2019 at 1:00 pm in reply to: [Resolved] Buddypress site wide activity as homepage for logged in users #20820
Hello brajesh,
Thank you very much your code worked perfectly, you are a life saver I’m really grateful for your help. I will also like to appreciate the good work you’re doing with buddypress. Your deep contribution has truly transformed buddypress from what it was 5 years ago.
God bless you
- Tosin on February 8, 2019 at 2:03 pm in reply to: [Resolved] Auto delete "Users" buddypress notifications after 60 days #20801
OK thanks so much i’m really grateful
- Tosin on February 5, 2019 at 10:09 am in reply to: [Resolved] Force profile photo upload on a specific page #20704
Hello,
This code below is preventing the code you sent from working
/** * Buddydev force follow 6 members function. */ function buddydev_check_or_redirect() { // Force profile photo active? $fp_active = class_exists( 'BD_Force_User_Avatar_Helper' ); // skip if logged and on non bp page. if ( is_user_logged_in() && ! is_buddypress() ) { if ( $fp_active ) { remove_action( 'bp_template_redirect', array( BD_Force_User_Avatar_Helper::get_instance(), 'check_or_redirect', ), 1 ); } return; } if ( ! function_exists( 'bp_follow_get_the_following_count' ) || ! is_user_logged_in() || is_super_admin() ) { return; } $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 >= 4 ) { 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 4 or more members to continue.' ), 'error' ); bp_core_redirect( bp_get_members_directory_permalink() ); } add_action( 'bp_template_redirect', 'buddydev_check_or_redirect', 0 );
Any feedback sir, thanks
- Tosin on January 23, 2019 at 8:53 am in reply to: How to restrict access to custom post typep based on blog post count #20458
Hello Brajesh,
Any feedback on this issue
Thank you
- Tosin on January 14, 2019 at 10:59 pm in reply to: How to restrict access to custom post typep based on blog post count #20222
Hello Brajesh,
I am not reffering to a specific plugin, I don’t have any classified plugin installed, but im reffering to any custom post type that will be created, the earlier classified was just used as an example of a custom post type, it could be any custom post type. e.g reviews, books, cars etc
Thanks