Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST
Be sure we're doing our best to manage your topic as soon as possible.
Hello,
I did it 🙂
To hide admin from members page as well as widgets…etc, use this code. I modified it out of experience, not knowledge, and the result is great.
/**
* Exclude Members from BuddyPress Members List.
*
* @param string $qs query string.
* @param string $object object name(members, groups etc).
*
* @return string
*/
function bpdev_exclude_users( $qs = '', $object = '' ) {
// list of users to exclude.
$excluded_user = '1'; // comma separated ids of users whom you want to exclude.
if ( $object != 'members' ) {
// hide for members only.
return $qs;
}
$args = wp_parse_args( $qs );
// check if we are listing friends?, do not exclude in this case.
if ( ! empty( $args['user_id'] ) ) {
return $qs;
}
if ( ! empty( $args['exclude'] ) ) {
$args['exclude'] = $args['exclude'] . ',' . $excluded_user;
} else {
$args['exclude'] = $excluded_user;
}
$qs = build_query( $args );
return $qs;
}
add_action( 'bp_ajax_querystring', 'bpdev_exclude_users', 20, 2 );
// Exclude Admins from Directories and BP Widgets
add_filter( 'bp_after_has_members_parse_args', 'buddydev_exclude_users' );
function buddydev_exclude_users( $args ) {
//do not exclude in admin
$excluded = isset( $args['exclude'] )? $args['exclude'] : array();
if( !is_array( $excluded ) ) {
$excluded = explode(',', $excluded );
}
$user_ids = array( 1, ); // enter user ids here
$excluded = array_merge( $excluded, $user_ids );
$args['exclude'] = $excluded;
return $args;
}
Regards
You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.
Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️
Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.
To unleash the full power of your Cera or Gwangi theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.
Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.