Replies
- xmginc on March 5, 2019 at 4:39 pm in reply to: [Resolved] BP Members With Uploaded Avatars Widget no longer showing members #21332This reply has been marked as private.
- xmginc on September 30, 2017 at 10:37 pm in reply to: [Resolved] synchronizing Member Types with WP Roles #10952
Hi Brajesh,
This would be a great addition to a multiblog enabled multisite – I’m wondering if this would be possible thanks!
- xmginc on September 27, 2017 at 7:19 pm in reply to: BuddyPress Member Types Pro – [bpmtp-members-list] shortcode #10878
That’s great to know thanks Brajesh!
Due to the nature of this particular directory which needs to be manually ordered, I’ve used the following method:
– used [bpmtp-members-list include=”…”] shortcode and inserted a single ID in the quotes
– repeated the shortcode for each member ID [bpmtp-members-list include=”10″][bpmtp-members-list include=”24″][bpmtp-members-list include=”17″] etc.
– used CSS to hide #pag-bottom and float and style each member as needed
– in this particular scenario, I am using a theme framework to create each member in their own columnsSo far, so good for the time being 😄
- This reply was modified 7 years, 2 months ago by xmginc.
- xmginc on September 27, 2017 at 6:46 pm in reply to: BuddyPress Member Types Pro – [bpmtp-members-list] shortcode #10876
Thanks for letting me know Brajesh. Good to know before I spend too much time on this 😄
It’s too bad there is no way to manually order the members yet in Buddypress…
Just an idea for future: I wish there was a way to use the user_id method but somehow pause and restart the loop between each id so that you can manually sort them by user_id number such as id 5, then id 3, then id 10 etc.
Aside from that, thanks again for an invaluable plugin. Love it.
- xmginc on September 26, 2017 at 9:57 pm in reply to: BuddyPress Member Types Pro – [bpmtp-members-list] shortcode #10863
Hi Brajesh,
Could there be a way to add values into the shortcode to manually order the directory?
For example, perhaps order alphanumerically based on an xprofile value?
My hope is to manually order a directory for managers based on their seniority – not alphabetically.
Thanks!
Kuni - xmginc on September 15, 2017 at 8:07 pm in reply to: Hide role type in directory of multiblog enabled multisite #10792
Hi Brajesh, that would be great – I’m in thx!
- xmginc on September 15, 2017 at 7:18 pm in reply to: Hide role type in directory of multiblog enabled multisite #10790
My apologies Brajesh – completely agree and while I’d like to share the final solution here, I’d like to communicate privately by message to be able to easily share login details etc.
Once the final solution is sorted, I’d like to share it here for anyone else that can benefit from a similar but possibly rare situation 😄
I will message you details shortly. Thank you!
- xmginc on September 15, 2017 at 6:04 pm in reply to: Hide role type in directory of multiblog enabled multisite #10788
Hi Brajesh,
Yes, multiblog is enabled and I have also sent you the WP login info via message as well.
Thx!
- xmginc on September 15, 2017 at 3:46 pm in reply to: Hide role type in directory of multiblog enabled multisite #10786
Thanks very much for your insight – I just started trying your BuddyPress Profile Visibility Manager and BuddyPress Member Types Pro – can’t believe I didn’t try these sooner!
I’m currently trying to see what is the best combination but here is what I’m trying to do either with these plugins or continuing with the code above:
Publicsite .com/members
– show standard members directory + profile page
– hide Admin, Contributors, Editors, Authors directory + profile pagePublicsite .com/privatearea/members
– show standard members directory + profile page
– show Admin, Contributors, Editors, Authors directory + profile pageSo far, your Visibility Manager plugin is amazingly powerful.
One thing I am still trying to see is if I can achieve site independent settings to show for private section but hide for public section for certain roles.
I’m currently changing tactic based on logged in vs logged out since the public would not be logged in.
Will post back soon if I can get all of this accomplished with your plugins.
PS: hard to believe so many questions I see in other forums could all be solved with these plugins 😄
- xmginc on September 15, 2017 at 3:36 am in reply to: Hide multiple user types from member/profile page #10662
For example, could this be combined somehow with this below so that not only will the member role type not be displayed in the directory, the URL of the profile page will also not be visible:
add_filter( ‘bp_after_has_members_parse_args’, ‘buddydev_exclude_users_by_role’ );
function buddydev_exclude_users_by_role( $args ) {
//do not exclude in admin
if( is_admin() && ! defined( ‘DOING_AJAX’ ) ) {
return $args;
}$excluded = isset( $args[‘exclude’] )? $args[‘exclude’] : array();
if( !is_array( $excluded ) ) {
$excluded = explode(‘,’, $excluded );
}//$role = ‘administrator’;//change to the role to be excluded
$user_ids = get_users( array( ‘role__in’ => [‘administrator’ , ‘contributor’ , ‘author’, ‘editor’] ,’fields’=>’ID’) );$excluded = array_merge( $excluded, $user_ids );
$args[‘exclude’] = $excluded;
return $args;
}Combined with the redirect of the profile page but including the various role types above:
function buddydev_redirect_from_admin_profile() {
//not a profile page or viewing own profile page, no redirect
if ( ! bp_is_user() || bp_is_my_profile() ) {
return;
}//check if the user is admin?
//there are multiple ways to do it, I will show for Super admin
//You can use user_can(bp_displayed_user_id(), ‘cap_name’ ) too, Make sure to change cap name to appropriate cap$redirect_url = site_url(‘/why-did-i-get-redirected’);//or any url
if ( is_super_admin( bp_displayed_user_id() ) ) {
bp_core_redirect( $redirect_url );
}}
add_action( ‘bp_template_redirect’, ‘buddydev_redirect_from_admin_profile’ );