Search Results for 'Hide Admin'
-
Search Results
-
Hi there
Is there any way of preventing users (other than admin) from deleting their own activity eg. I don’t want them to be able to delete entries such as “User x updated their profile”.
I’ve successfully prevented commenting on certain activities using bp_activity_can_comment and I’m thinking maybe I can use bp_activity_user_can_delete in a similar way, but can’t seem to make that work.
Any suggestions would be gratefully received.
With many thanks in advance.
PS. I know I can hide “Delete” with CSS but would really prefer to use a filter instead.
Hi,
I would like to change the ‘show_tab’ arguments based on a setting made upon group creation.
Something like:$is_wanted = groups_get_groupmeta( $group_id, ‘show-to’ );
<?php if ($is_wanted): ?>
‘show_tab’=> ‘member’
<?php else: ?>
‘show_tab’=> ‘admin’
<?php endif; ?>How can this parameter be accessed?
It would also be ok to hide the tab in the group compleatly, like$parent_nav_slug = bp_get_current_group_slug();
$tab = ‘gruppen-stockkarte’;
bp_core_remove_subnav_item( $parent_nav_slug, $tab, ‘groups’ );BUT based on the group_id and groups_get_groupmeta, not for all groups.
Thanks for your help!
( sorry for doubbling the topic, I couldnt figure out how to edit)
WordPress 4.9.5 -> BuddyPress 2.9.4 -> Agama Blue Child Theme
I ended up with the below code from posts in these forums but it doesn’t do quite what I need it to do.
Users should not be able to see other users’ friends so the Friends tab when viewing another user’s profile page must be removed along with the functionality. Here’s my code:function bpfr_hide_tabs() { if ( !is_super_admin() && !bp_is_my_profile() ) { bp_core_remove_subnav_item( 'profile', 'friends' ); // This does nothing //bp_core_remove_nav_item( 'friends' ); //Or this but this also hides the Friends main menu item, not just the Friends tab in the user's profile page } } add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );
I’ve switched between both options in the code.
bp_core_remove_subnav_item( 'profile', 'friends' );
doesn’t really do anything andbp_core_remove_nav_item( 'friends' );
does remove the Friends tab from another user’s profile but it also removes it from the main menu which is a different thing. The main menu Friends link points to my own Friends whereas the Friends tab in another user’s profile points to their friends. Any help would be appreciated.WordPress 4.9.5 -> BuddyPress 2.9.4
Hi all,
This is when viewing a user’s profile page. I removed the Friends tab with the below code but the View tab is still showing (it’s not necessary since the Profile tab is there and points to the same place, the user’s profile page). Is there a list somewhere of the slugs for the tabs or is there a function that can generate that? Or am I completely off about this 🙂
Thanks in advance.
function remove_nav_items() {
if ( !bp_is_my_profile() && !is_super_admin()) {
bp_core_remove_nav_item( 'friends' );
bp_core_remove_nav_item( 'view' );
}
}
add_action( 'bp_setup_nav', 'remove_nav_items',301);
Topic: Hiding the admin user
Hi How do you hide the admin user from Buddypress? Thanks!
Topic: Hiding Admin Accounts
I saw a thread here:
https://buddypress.org/support/topic/how-can-i-disable-the-last-active-time/However, I’d like it to hide for everybody apart from me, the Admin.
Doable?
I tried to implement the following code:
function buddydev_hide_members_directory_from_all_except_admin() { if ( bp_is_members_directory() && ! is_super_admin() ) { //should we add a message too? //bp_core_add_message( 'Private page.', 'error' ); bp_core_redirect( site_url('/') ); } } add_action( 'bp_template_redirect', 'buddydev_hide_members_directory_from_all_except_admin' );
in plugins> bp-custom.php. Just in case, I also tried to implement it by creating a new plugin folder > bp-custom.php in the child theme, but the member directory page is still visible to non-admin/non-logged in users.
Good day,
Am not sure if this is the right place to put this but please do pardon me .
I wanted to ask any one or the buddy-press support team on how where they able to implement the this certain functions to the site.
https://postimg.org/image/urrv2bmbp/1) Have a create new topic button on the admin menu tab
2 ) is there a way to hide the Mysites – from other users except admin ( as I do make use of a multisite)
– if its not possible is there a way to customize it from My site to something like “Site Tool” and a way to change the W – logo to something else.
In all Thank you very much, as I do appreciate your help and assistGood Afternoon, I wanted to ask if there was any-one who has an ides how to hide site > my site which is created by buddypress on the admin dashboard area. as below
https://postimg.org/image/dop3730kl/As i was able to find a way to hide the site from the user profile thanks to @vapvarun
using the functionfunction vap_remove_buddypress_sites_tabs() { global $bp; // to remove main menu for sites. bp_core_remove_nav_item('blogs' ); } add_action( 'bp_setup_nav', 'vap_remove_buddypress_sites_tabs', 999 );
But the question is how do i hide it also in the admin dashboard.
As preferable I would likely wish if i could hide it specifically from other users except admin and site owner.
Thank you in advanceFor privacy issues I want to hide certain links on profile view.
i use the snippet, mentioned here (see script below):
oneThis works fine with BP related links, but I cannot hide links from CPT like rtMedia and the link of this:
`function bp_postsonprofile() {
add_action( ‘bp_template_content’, ‘profile_screen_posts_show’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
}function profile_screen_posts_show() {
$myposts = get_posts( array(
‘posts_per_page’ => -1,
‘author’ => bp_displayed_user_id(),
‘post_type’ => ‘post’
));if( ! empty($myposts) ) {
echo ‘<ul>’;
foreach($myposts as $post) {
setup_postdata( $post );
echo ‘<li><a href=”‘ . get_permalink($post->ID) . ‘”>’ . get_the_title($post->ID) . ‘</a></i>’;
}echo ‘</ul>’;
wp_reset_postdata();
} else {
echo ‘<div class=”info” id=”message”><p>’. bp_displayed_user_fullname() .’ hat keine Beiträge veröffentlicht.</p></div>’;
}
}add_action ( ‘profile_screen_posts_show’ );`
function bpfr_hide_tabs() {
global $bp;
/**
* class_exists() & bp_is_active are recommanded to avoid problems during updates
* or when Component is deactivated
*/if( class_exists( ‘bbPress’ ) || bp_is_active ( ‘groups’ ) ) :
/** here we fix the conditions.
* Are we on a profile page ? | is user site admin ? | is user logged in ?
*/
if ( bp_is_user() && !is_super_admin() && !is_user_logged_in() ) {/* and here we remove our stuff ! */
bp_core_remove_nav_item( ‘activity’ );
bp_core_remove_nav_item( ‘friends’ );
bp_core_remove_nav_item( ‘groups’ );
bp_core_remove_nav_item( ‘posts’ );
bp_core_remove_nav_item( ‘forums’ );
bp_core_remove_nav_item( ‘media’ );
}
endif;
}
add_action( ‘bp_setup_nav’, ‘bpfr_hide_tabs’, 15 );Topic: registration email
Hi,
I have noticed all emails sent when someone registers are from wordpress@mydomainname.com! Is it possible to change it to admin@mydomainname.com or completely hide wordpress from email correspondences?
Regards,
JacobHello,
How to hide the button “Members” in the display of a group?
https://screenshots.firefox.com/4fhh6NF0U12mYFQu/nullThe following code does not work:
function bpex_hide_members_menu_tabs() { if ( bp_is_group() ) { if ( is_super_admin() ) return ; bp_core_remove_nav_item('members'); } }
Regards
Topic: BuddyPress/WP Login question
Hi,
I have a site and on the sidebar i have buddypress login widget, if the user enters nothing and clicks login their directed to a custom version of wp-login and asked to log in.
before when the user then logged in from here it would redirect them to the main page of the buddypress site.
but i then wanted to hide the fact that it is a wpsite by using a plugin to edit wp-admin.php to login.php.
upon installing this plugin, when you login from what was wp login form it then directs you the the wp-admin page.
i didnt want this so i deleted the plugin, but it didnt revert back as such, the link now says wp-login but they users dont redirected to the site, they redirect to wp-admin.
how can i redirect users when using this form to go direct to the site and not wp-admin.
thanks