@anonymized-16480907
2 years, 6 months ago
@nanomania
check this url profile field visibility
@andrew_long15
use this code.
/** * Removes send invite tab according to Group Invitations setting. * * @since 2.2.0 */ function remove_send_invite_tab() { if ( ! bp_is_group() || ( bp_is_current_action( ‘admin’ ) && bp_action_variable( 0 ) ) || is_super_admin() ) { return; }
// Add the admin subnav slug you want to hide in the following array. $hide_tabs = array( ‘send-invites’ => 1, );
$parent_nav_slug = bp_get_current_group_slug(); $current_group_id = bp_get_current_group_id(); $invite_status = groups_get_groupmeta( $current_group_id, ‘invite_status’, true ); if ( ‘admins’ === $invite_status || ‘mods’ === $invite_status ) { // Remove the nav items. foreach ( array_keys( $hide_tabs ) as $tab ) { bp_core_remove_subnav_item( $parent_nav_slug, $tab, ‘groups’ ); } }
// You may want to be sure the user can’t access. if ( ! empty( $hide_tabs[ bp_action_variable( 0 ) ] ) ) { bp_core_add_message( ‘No tienes suficientes permisos para acceder.’, ‘error’ ); bp_core_redirect( bp_get_group_permalink( groups_get_current_group() ) ); } } add_action( ‘bp_actions’, ‘remove_send_invite_tab’, 9 );
@chrishechler
you can add the bp-custom.php file to your WordPress theme or child theme. once you created the file, you can add your code snippet between the start and end symbols: <?php .... ?>
<?php .... ?>
thanks
2 years, 10 months ago
Hello,
check this link and follow the instructions given on this page.
BuddyPress Template Override