Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

Saad Ibra

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Saad Ibra
    Participant
    • 2 Topics
    • 6 Posts
    @sio80

    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

    Saad Ibra
    Participant
    • 2 Topics
    • 6 Posts
    @sio80

    Hello ,

    Thank you for your interaction and response to my message. Yes, I followed these steps, but I received this error message. This is also a screenshot of the error line.

    Regards,

    Saad Ibra
    Participant
    • 2 Topics
    • 6 Posts
    @sio80

    Hi,

    Thank you for the clarification, the issue has been resolved.
    The solution was by giving powers to members by Paid Memberships Pro plugin.
    I explained this in the attached picture.

    Regard,

    Saad Ibra
    Participant
    • 2 Topics
    • 6 Posts
    @sio80

    Hi Manathan,
    I did, but unfortunately the icons are not visible to regular members, they are only visible to the admin.

    regards,

Viewing 4 posts - 1 through 4 (of 4 total)

Troubleshooting Demo Imports

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.

Happy With our Support So Far?

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 ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Setup Your Cera or Gwangi powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

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.

Holiday, Weather & Festive effects
to pimp your WordPress Site