• Dashboard
    • Submit Ticket
    • Licenses
    • Login
  • Our Products
    • BuddyBuilder
    • Kleo
    • Typer
    • Seeko
    • SweetDate
    • BuddyApp
  • Services
    • VIP Support
    • WordPress Theme Installation Service
  1. Home
  2. Seeko
  3. Hide Admin Users from the Members Directory

Hide Admin Users from the Members Directory

For any theme using buddy press you will realize it has a members directory page. As an admin user you can hide your profile from other members in the seeko theme.

The Seeko theme is normally bundled with one already customizable child theme.you can simply edit the funtions.php file to add the code below or else,  If you’re using this child theme and you don’t want to change existing files for fear of missing the customization options in an upcoming update, we suggest adding snippets to the WordPress admin section with the Code Snippets plugin.

When the plugin has been enabled and activated, just visit Snippets > > Add New. Label the snippet and type or insert the code below. 

In Most cases, you would just have to run this code snippet while browsing your website content. Simply choose the “Only run on site front-end” method and tap the “Save Changes and Activate” button. In case you are not sure or if you have a problem with your snippet, you can simply leave as the default “Run snippets everywhere” option.


// Remove admin from the member directory
function seeko_hide_admins_from_directory( $qs = false, $object = false ) {
$excluded_user = implode( ',', get_users( 'role=administrator&fields=ID' ) );
if ( $object != 'members' && $object != 'friends' ) // hide admin to members & friends
return $qs;
$args = wp_parse_args( $qs );
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', 'seeko_hide_admins_from_directory', 20, 2 );

Blazing Fast Site Hosting & Maintenance

  • Welcome to SEEKO theme!
  • What's included
  • Theme Requirements
  • WordPress Installation
  • How to install Seeko theme
  • Importing demo content
  • Theme Automatic Updates
  • Bundled plugins
  • BuddyPress overview
  • Elementor overview
  • STAX Header Builder overview
  • Seeko Search overview
  • Matching System overview
  • Membership additions
  • rtMedia overview
  • Membership overview
  • Paid Memberships Pro
  • Enabling BuddyPress Groups
  • Introduction to the child theme
  • Customizer
  • Performance
  • Overriding a file with the child theme
  • How to Setup a Footer with Elementor on Seeko Theme
  • How To Use Seeko Theme With One Header Only
  • How To Implement both Ajax and Facebook Login on Seeko
  • How to add Search form in Seeko theme
  • How To Change the Seeko Logo To Your Own Logo
  • How to to speed up the Loading time on Seeko Theme
  • Saving Customizer Settings(Import/Export)
  • Trigger Search modal from Header button
  • How to add Login and Register Modal
  • Sidebar locations
  • Setting a layout template globally
  • Setting a layout to specific page
  • Registering the theme
  • Find Theme Purchase Code
  • Translate theme with Loco Translate
  • Multilingual setup using WPML plugin
  • Translate Plugin Strings
  • Files & Structure
  • Changelog
  • How to add a Populated Country List XPROFILE
  • Troubleshooting an issue
  • Error 404 - Page not found
  • Hide Admin Users from the Members Directory
BuddyBuilder is out. Total freedom to build online communities
SeventhQueen  - 2021 - Privacy Policy

Welcome to SeventhQueen Portal


Lost your password?

Don't have an account? Register now!

Forgot your details?



Wait, I remember now. Log In

Register your account

Sign up with Email
I have an account. Log In

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.