Search Results for 'Hide Admin'
-
Search Results
-
Hi, I want to show the loggedin user profile if he/she tries to access other user’s profile.
Here’s a list of what I want and what I’ve accomplished- OK – Redirect to own profile when entering /members/
- X – Redirect to own profile when entering another profile via link
- OK – WMDs can view member listings
- OK – ADMs can view member profile
This is the code i have until now
function buddydev_hide_members_directory_for_all_except_users_with_specific_roles() { if ( ! bp_is_members_directory() ) { return; } if ( !is_user_logged_in() ) { bp_do_404(); load_template( get_404_template() ); exit( 0 ); } $allowed_roles = array( 'administrator', 'editor' ); $hide = true; $user = wp_get_current_user(); foreach ( $allowed_roles as $role ) { if ( in_array( $role, $user->roles, true ) ) { $hide = false; break; } } if ( ! $hide ) { return; } /** * bp_is_my_profile() * bp_is_user_profile() * bp_is_user() * bbp_is_single_user_profile() * bbp_is_user_home() * bbp_is_single_user() */ if(!bbp_is_user_home()){ wp_redirect(bp_loggedin_user_domain()); } //REDIRECT TO USER PROFILE wp_redirect(bp_loggedin_user_domain()); exit( 0 ); } add_action( 'bp_template_redirect', 'buddydev_hide_members_directory_for_all_except_users_with_specific_roles' );I tried some things like the last IF with the commented functions but none work, so I guess I’m doing something wrong. Can you help me plz?
Thanks in advance
How can I do this in the current version? Then when they login it is there so they can edit etc their profile.
Hello,
I am looking for php code to be inserted into my custom function plugin so that my admin account will be visible hidden from members on members directory and else where.
I did see some colder codes here but it does not seem to be working on the current BuddyPress version.
Does anyone have the workable code?
Thanks
Topic: “Show password” in login
Hello,
does anybody know if such a tutoral exists also for buddypress?: https://www.champ.ninja/2020/05/show-passwords-feature-in-ultimate-member-forms/
Maybe I was searching for the wrong terms. I have hide/show password with wp-admin.php of course but not for regular members when registering or loggin in, so I would like to add this.
Good Day,
I currently have BuddyPress Create Group Type and BuddyPress installed on my word press website. I use it such a way the administrators of each group do not necessarily have to edit a few of the settings because they are usually less tech savy. I would like to know is it possible to hide some of the settings on the front end in the management window such as settings, delete and forums.Also I would like to know if it is possible to have the email information that is sent to person when they are rejected from a group to be changed? Because we find the you have been rejected message a bit harsh.
Hi,
I want only the admin to have access to the memberslist.
How to achieve that?hi there,
i am looking for a way to hide user role in member page, i still don’t have a working solution. anyone have any ideas, thanks.I tried using this guide:
https://wordpress.org/support/topic/hide-admin-users-from-being-displayed-in-members-directory/ is not working.Hello, I wanted to ask, how can I exclude certain member role from showing on member list and be redirected to “wp-login” when non logged visitors try to access their profile.
-
For first task, I use this code to exclude certain user ID from beeing in member list (but this code need modification to accept certain role and don’t show those member just for non logged visitors)
function bpdev_exclude_users($qs=false,$object=false){ $excluded_user='1'; // Id's to remove, separated by comma 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','bpdev_exclude_users',20,2); // once admin is removed, we must recount the members ! function bpfr_hide_get_total_filter($count){ return $count-1; } add_filter('bp_get_total_member_count','bpfr_hide_get_total_filter');-
For second task, I use this code but I dont know how to select certain member role{
function nonreg_visitor_redirect() { global $bp; if ( bp_is_user() && !is_super_admin() ) { if(!is_user_logged_in()) { //just a visitor and not logged in wp_redirect( get_option('siteurl') . '/wp-login.php' ); } } } add_filter('get_header','nonreg_visitor_redirect',1);Hi, i feel like im doing this properly but i never get the right result. i have a custom meta called “featured” in activity meta. For testing purposes the meta values are 1,2,3,4 my goal is to have an activity loop order activities by the meta value. i’ve checked the documentation and i came up with this.
<?php get_header(); ?> <?php get_template_part('page-parts/general-title-section'); ?> <?php get_template_part('page-parts/general-before-wrap'); $atts = array( 'title' => 'Latest Activity',// title of the section. 'pagination' => 1,// show or not. 'load_more' => 0, 'display_comments' => 'threaded', 'include' => false, // pass an activity_id or string of IDs comma-separated 'exclude' => false, // pass an activity_id or string of IDs comma-separated 'in' => false, // comma-separated list or array of activity IDs among which to search 'sort' => 'DESC', // sort DESC or ASC 'page' => 1, // which page to load 'per_page' => 5, // how many per page. 'max' => false, // max number to return. 'count_total' => true, // Scope - pre-built activity filters for a user (friends/groups/favorites/mentions). 'scope' => false, // Filtering 'user_id' => false, // user_id to filter on 'object' => false, // object to filter on e.g. groups, profile, status, friends 'action' => false, // action to filter on e.g. activity_update, new_forum_post, profile_updated 'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc. 'secondary_id' => false, // secondary object ID to filter on e.g. a post_id. // Searching 'search_terms' => false, // specify terms to search on. 'use_compat' => bp_use_theme_compat_with_current_theme(), 'allow_posting' => false, // experimental, some of the themes may not support it. 'container_class' => 'activity',// default container, 'hide_on_activity' => 1,// hide on user and group activity pages. 'for' => '', // 'logged','displayed','author'. 'role' => '', // use one or more role here(e.g administrator,editor etc). 'for_group' => '',// group slug. ); $atts['meta_query']= array( array( 'key' => 'featured', 'value' => '0', 'type' => 'numeric', 'compare' => '!=', ), 'meta_type' => 'numeric', 'orderby' => 'meta_value_num', 'meta_key' => 'featured', 'order' => 'DESC' ); ?> <div id="buddypress"> <?php do_action( 'bp_before_activity_loop' ); if ( bp_has_activities( $atts ) ) : ?> <div class="<?php echo esc_attr( $atts['container_class'] ); ?> <?php if ( ! $atts['display_comments'] ) : ?> hide-activity-comments<?php endif; ?>"> <ul id="activity-stream" class="activity-list item-list"> <?php while ( bp_activities() ) : bp_the_activity(); ?> <?php bp_get_template_part( 'buddypress/activity/entry' ); ?> <?php endwhile; ?> <?php if ( $atts['load_more'] && bp_activity_has_more_items() ) : ?> <li class="load-more"> <a href="<?php bp_activity_load_more_link() ?>"><?php _e( 'Load More', 'buddypress' ); ?></a> </li> <?php endif; ?> </ul> <?php if ( $atts['pagination'] && ! $atts['load_more'] ) : ?> <div class="pagination"> <div class="pag-count"><?php bp_activity_pagination_count(); ?></div> <div class="pagination-links"><?php bp_activity_pagination_links(); ?></div> </div> <?php endif; ?> </div> <?php else : ?> <div id="message" class="info"> <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ); ?></p> </div> <?php endif; ?> ?> </div> <?php do_action( 'bp_after_activity_loop' ); ?> <?php get_template_part('page-parts/general-after-wrap'); ?> <?php get_footer(); ?>everything here works except for the order. for some reason it always orders by activity ID. am i missing something here? Thanks in advance im going crazy with this.
Topic: Hide Admin(s) from Bp Widget
How to hide the admin profile in the section (recently active?)
Topic: Hiding Toolbar for members
Hi,
how can i hide the wordpress toolbar (adminbar) for logged in (!) buddypress members?
thanks!
How do I remove/hide the “View Admins” button from groups page?
Hi there,
I would like to hide the admin bar for users, but I still want them to be able to edit and update their profile. Therefore, I need a link in the front end to the profile edit screen.
Can you please help me achieve this?
Thanks.Topic: Hide admin profile
Hi there,
I’ve seen a lot of people asking this but no one provided a good solution to do so.
So, is there a way to hide the admin profile from other members ?
I don’t want my activities to appear in the stream or people to have access to my admin profile.I tried a bunch of plugins and code lines I found through Google but nothing worked.
Thank you!
Topic: Hide Admins from Search
Hi Everyone,
Need your help.
How do I hide Admins from the search Members list on the frontend using BuddyPress?
Regards
StephenHowdy, BuddyPress friends!
I have been working on a project for fun and have been enjoying the laying out of items and adding plugin functionality a bit much here lately. So much so, in fact, that I put the testing phase on the back shelf for a bit.
When I was attempting to request membership from a test account to a private group that my admin account was the creator of, I ran into an issue: I can get to the request page (/groups/test-group/request-membership/?_wpnonce=47febc75fe) by clicking the link to do so and then am presented with a textarea for request comments, however when I submit the form (with or without comments) I am taken back to the group’s main page (/groups/test-group/) and am presented with “There was an error sending your group membership request. Please try again.” The request does not come through (not in BP’s notifications, e-mail, pending requests, etc.) at all.
At first this was a minor irritation because I could go to the group as the admin and invite the test account to join the group. There I am presented with a checkbox for my test account’s name, as well as a submit button; however when clicking on the checkbox, the form instantly submits without ever sending an invite. I even attempted to modify the live source to set the field to checked, attempted to submit, and received a success message stating my invite was sent, but of course it never was.
I have checked the list of plugins I have on my site, disabled a few I didn’t necessarily need, and have checked each of the remaining to see if there’s any sort of conflict between plugins affecting groups, but to no avail. This functionality is key to the use of groups for my project, so I would sincerely appreciate any advice from more knowledgeable members of the BP community.
Some support information, including a list of active plugins, can be found below. Please note that any plugin with ** beside it came bundled with the theme.
== Server Environment == Operating System: Linux Software: Apache/2.4.6 MySQL version: MariaDB Server v5.5.61-MariaDB-38.13 PHP Version: 7.2.24 PHP Max Input Vars: 2500 PHP Max Post Size: 64M GD Installed: Yes ZIP Installed: Yes Write Permissions: All right Elementor Library: Connected == WordPress Environment == Version: 5.3.2 WP Multisite: No Max Upload Size: 64 MB Memory limit: 512M Permalink Structure: /%postname%/ Language: en-US Timezone: America/New_York Debug Mode: Inactive == Theme == Name: Gwangi Version: 2.1.1 Author: Themosaurus Child Theme: No == User == Role: administrator WP Profile lang: en_US User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 == Active Plugins == (BuddyDev) BP Auto Login on Activation Version: 1.0.3 Author: Brajesh Singh Author Avatars List** Version: 1.18 Author: Paul Bearne Awesome Weather Widget Version: 3.0.2 Author: Hal Gatewood bbPress Version: 2.6.3 Author: The bbPress Contributors BP Messages Tool Version: 2.1 Author: PhiloPress BP Profile Search Version: 5.2.4 Author: Andrea Tarantini BuddyPress Version: 5.1.2 Author: The BuddyPress Community BuddyPress Default Cover Photo Version: 1.6.0 Author: SeventhQueen BuddyPress Extended Friendship Request Version: 1.2.0 Author: BuddyDev Team BuddyPress Reorder Tabs Version: 2.0.1 Author: BuddyBoss BuddyPress Xprofile Custom Field Types Version: 1.1.3 Author: BuddyDev Classic Editor Version: 1.5 Author: WordPress Contributors Classic Editor Addon Version: 2.6.0 Author: Pieter Bos, Greg Schoppe Dashboard Notepad Version: 1.42 Author: Stephanie Leary Easy Custom Sidebars** Version: 1.0.10 Author: Titanium Themes Elementor** Version: 2.8.3 Author: Elementor.com Envato Market Version: 2.0.3 Author: Envato Essential Addons for Elementor Version: 3.7.1 Author: WPDeveloper Grimlock** Version: 1.2.5 Author: Themosaurus Grimlock Animate** Version: 1.1.0 Author: Themosaurus Grimlock for Author Avatars List** Version: 1.0.4 Author: Themosaurus Grimlock for bbPress** Version: 1.0.3 Author: Themosaurus Grimlock for BuddyPress** Version: 1.1.4 Author: Themosaurus Grimlock for Elementor** Version: 1.0.1 Author: Themosaurus Grimlock for Jetpack** Version: 1.0.4 Author: Themosaurus Grimlock for Testimonials by WooThemes** Version: 1.1.0 Author: Themosaurus Grimlock for The Events Calendar** Version: 1.1.2 Author: Themosaurus Grimlock Hero** Version: 1.0.7 Author: Themosaurus Grimlock Isotope** Version: 1.0.7 Author: Themosaurus Grimlock Login** Version: 1.0.10 Author: Themosaurus Hide Admin Bar Version: 0.3.9.9 Author: Shelby DeNike If Menu - Visibility control for menu items Version: 0.15 Author: Layered Kirki Customizer Framework** Version: 3.0.45 Author: Ari Stathopoulos MediaPress Version: 1.4.6 Author: BuddyDev Menu Image** Version: 2.9.5 Author: Rui Guerreiro Simple Buddypress Profile Privacy Version: 0.7.9 Author: Justin Hansen Social Articles Version: 2.9.5 Author: Broobe The Events Calendar Version: 4.9.14 Author: Modern Tribe, Inc. UpdraftPlus - Backup/Restore Version: 1.16.21 Author: UpdraftPlus.Com, DavidAnderson Verified Member for BuddyPress** Version: 1.1.1 Author: Themosaurus == Must-Use Plugins == Gateway Relay Version: 1.0 Author: Arnold Bailey (Incsub) rms_unique_wp_mu_pl_fl_nm.php Version: Author: WPMU Assist Version: 1.0.2 Author: Arnold Bailey (Incsub) == Elements Usage == wp-page : 12 eael-adv-tabs : 1 google_maps : 1 image-carousel : 1 shortcode : 1 text-editor : 1 wp-widget-grimlock_author_avatars_section_widget : 1 wp-widget-grimlock_posts_section_widget : 1 wp-widget-grimlock_query_section_widget : 1 wp-widget-grimlock_section_widget : 3 wp-widget-grimlock_the_events_calendar_tribe_events_section_widget : 1 == Log == PHP: showing 1 of 1PHP: 2020-01-02 10:43:38 [error X 1][/home/*****/public_html/wp-content/plugins/elementor/elementor.php::97] Cannot redeclare elementor_fail_wp_version() (previously declared in /home/*****/public_html/wp-content/plugins/elementor/elementor.php:97) [array ( 'trace' => ' #0: Elementor\Core\Logger\Manager -> shutdown() ', )] JS: showing 1 of 1JS: 2020-01-11 16:50:05 [error X 1][https://*****/wp-content/plugins/grimlock/assets/js/navigation-stick-to-top.js?ver=1.2.5:27:45] Cannot read property \'top\' of undefined