Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'Hide Admin'

Viewing 25 results - 51 through 75 (of 907 total)
  • Author
    Search Results
  • #307760
    beat sk
    Participant

    Hello,

    I have a question about buddypress profile menu. How can i make a link in the menu only for userroles? Something like “Go to administration” in the profile menu – Profile, Activity, Groups, Messages ? Is there a chance to add this only for user roles and admins? Register and Login working on front-end and we want hide /wp-admin from others. Thank you.

    #307742
    todga
    Participant

    Hello,
    Please, is there a plugin that can hide all members in buddypress to members, so that members can only see their friends in own profile?
    Only admin can see all members.
    Also hide all groups, newest groups, new groups, new members, groups memberships, friendships.
    Only admin can see all them.
    Thanks.

    #306977
    beat sk
    Participant

    Hello,

    I have a question about buddypress profile menu. How can i make a link in the menu only for userroles? Something like “Go to administration” in the profile menu – Profile, Activity, Groups, Messages ? Is there a chance to add this only for user roles and admins? Register and Login working on front-end and we want hide /wp-admin from others. Thank you for positive/negative feedback.

    #306908
    beat sk
    Participant

    Hello again friends. 🙂

    Now I have a question about buddypress profile menu. How can i make a link in the menu only for userroles? Something like “Go to administration” in the profile menu – Profile, Activity, Groups, Messages ? Is there a chance to add this only for user roles and admins? The website is built to hide we are using wordpress in front of people. Register and Login working on front-end and we want hide /wp-admin from others. Thank you for positive/negative feedback.

    #306826
    chris19731973
    Participant
    <?php
    
    /**
     * Listing detail Page.
     *
     * @link    https://pluginsware.com
     * @since   1.0.0
     *
     * @package Advanced_Classifieds_And_Directory_Pro
     */
     
    // Exit if accessed directly
    if ( ! defined( 'WPINC' ) ) {
    	die;
    }
    
    /**
     * ACADP_Public_Listing Class.
     *
     * @since 1.0.0
     */
    class ACADP_Public_Listing {
    	
    	/**
    	 * Filter the post content.
    	 *
    	 * @since  1.5.4
    	 * @param  string $html The post thumbnail HTML.
    	 * @return string $html Filtered thumbnail HTML.
    	 */
    	public function post_thumbnail_html( $html ) {	
    		if ( is_singular( 'acadp_listings' ) ) {
    			return '';
    		}
    		
    		return $html;		
    	}
    	
    	/**
    	 * Filter the post content.
    	 *
    	 * @since  1.0.0
    	 * @param  string $content Content of the current post.
    	 * @return string $content Modified Content.
    	 */
    	public function the_content( $content ) {		
    		if ( is_singular( 'acadp_listings' ) && in_the_loop() && is_main_query() ) {		
    			global $post;
    			
    			acadp_update_listing_views_count( $post->ID );
    			
    			$general_settings      = get_option( 'acadp_general_settings' );
    			$recaptcha_settings    = get_option( 'acadp_recaptcha_settings' );	
    			$registration_settings = get_option( 'acadp_registration_settings' );
    
    			$post_meta = get_post_meta( $post->ID );
    			
    			$description = $content;
    					
    			$can_show_date         = isset( $general_settings['display_options'] ) && in_array( 'date', $general_settings['display_options'] )  ? true : false;
    			$can_show_user         = isset( $general_settings['display_options'] ) && in_array( 'user', $general_settings['display_options'] )  ? true : false;
    			$can_show_views        = isset( $general_settings['display_options'] ) && in_array( 'views', $general_settings['display_options'] ) ? true : false;
    			$can_show_contact_form = empty( $general_settings['has_contact_form'] ) ? false : true;	
    			$can_add_favourites    = empty( $general_settings['has_favourites'] )   ? false : true;
    			$can_report_abuse      = empty( $general_settings['has_report_abuse'] ) ? false : true;
    			$has_widgets           = acadp_has_active_listing_widgets();
    			$has_sidebar           = ! $has_widgets;
    			
    			// $login_url
    			$current_page_url = get_permalink();
    			$login_url        = acadp_get_user_login_page_link( $current_page_url );
    			
    			// $location
    			$has_location = empty( $general_settings['has_location'] ) ? false : true;
    			$can_show_location = false;
    			
    			if ( $has_location ) {
    				$location = wp_get_object_terms( $post->ID, 'acadp_locations' );
    			
    				if ( ! empty( $location ) ) {
    					$location = $location[0];
    					$can_show_location = true;
    				}
    			}
    			
    			// $category
    			$has_category = false;
    			$can_show_category = isset( $general_settings['display_options'] ) && in_array( 'category', $general_settings['display_options'] ) ? true : false;
    			$can_show_category_desc = isset( $general_settings['display_options'] ) && in_array( 'category_desc', $general_settings['display_options'] ) ? true : false;
    			$categories = wp_get_object_terms( $post->ID, 'acadp_categories' );
    			
    			if ( empty( $categories ) ) {
    				$can_show_category = false;
    			} else {
    				$category = $categories[0];
    				$has_category = true;
    			}
    			
    			// $can_show_images
    			$has_images = empty( $general_settings['has_images'] ) ? false : true;
    			$can_show_images = false;
    			
    			if ( $has_images ) {
    				$can_show_images = isset( $post_meta['images'] ) ? true : false;
    			}
    			
    			// $can_show_video
    			$has_video = empty( $general_settings['has_video'] ) ? false : true;
    			$can_show_video = false;
    			$video_url = '';
    			
    			if ( $has_video ) {
    				if ( ! empty( $post_meta['video'][0] ) ) {
    					$video_url = acadp_parse_videos( $post_meta['video'][0] );	
    					$can_show_video = empty( $video_url ) ? false : true;				
    				}				
    			}
    			
    			// $can_show_map
    			$has_map = ! empty( $general_settings['has_map'] ) && empty( $post_meta['hide_map'][0] ) ? true : false;
    			$can_show_map = false;
    		
    			if ( $can_show_location && $has_map ) {			
    				$can_show_map = ! empty( $post_meta['latitude'][0] ) && ! empty( $post_meta['longitude'][0] ) ? true : false;
    			}
    
    			// $can_show_price
    			$has_price = empty( $general_settings['has_price'] ) ? false : true;
    			$can_show_price = false;
    		
    			if ( $has_price && isset( $post_meta['price'] ) && $post_meta['price'][0] > 0 ) {
    				$can_show_price = true;
    			}
    			
    			// Get custom fields
    			$fields = array();
    			$category_ids = array();
    
    			foreach ( $categories as $category ) {
    				$category_ids[] = $category->term_id;
    			}
    
    			$custom_field_ids = acadp_get_custom_field_ids( $category_ids );	
    					
    			if ( ! empty( $custom_field_ids ) ) {
    				$args = array(
    					'post_type' => 'acadp_fields',
    					'post_status' => 'publish',
    					'posts_per_page' => 500,	
    					'post__in' => $custom_field_ids,
    					'no_found_rows' => true,
    					'update_post_term_cache' => false,	
    					'meta_key' => 'order',
    					'orderby' => 'meta_value_num',				
    					'order' => 'ASC'
    				);
    				
    				$acadp_query = new WP_Query( $args );
    
    				if ( $acadp_query->have_posts() ) {
    					$fields = $acadp_query->posts;
    				}
    			}
    
    			// Process output
    			ob_start();
    			do_action( 'acadp_before_listing_content' );
    			include( acadp_get_template( "listing/acadp-public-listing-display.php" ) );
    			do_action( 'acadp_after_listing_content' );
    			$content = ob_get_clean();		
    		}
    		
    		return $content;		
    	}
    	
    	/**
    	 * Add or Remove favourites.
    	 *
    	 * @since 1.0.0
    	 */
    	public function ajax_callback_add_remove_favorites() {	
    		check_ajax_referer( 'acadp_ajax_nonce', 'security' );
    
    		$post_id = (int) $_POST['post_id'];
    		
    		$favourites = (array) get_user_meta( get_current_user_id(), 'acadp_favourites', true );
    		
    		if ( in_array( $post_id, $favourites ) ) {			
    			if ( ( $key = array_search( $post_id, $favourites ) ) !== false ) {
        			unset( $favourites[ $key ] );
    			}
    		} else {
    			$favourites[] = $post_id;
    		}
    		
    		$favourites = array_filter( $favourites );
    		$favourites = array_values( $favourites );
    		
    		delete_user_meta( get_current_user_id(), 'acadp_favourites' );
    		update_user_meta( get_current_user_id(), 'acadp_favourites', $favourites );
    		
    		the_acadp_favourites_link( $post_id );
    		
    		wp_die();	
    	}
    	
    	/**
    	 * Report Abuse.
    	 *
    	 * @since 1.0.0
    	 */
    	public function ajax_callback_report_abuse() {	
    		check_ajax_referer( 'acadp_ajax_nonce', 'security' );
    
    		$data = array( 'error' => 0 );
    		
    		if ( acadp_is_human('report_abuse') ) {		
    			if ( acadp_email_admin_report_abuse() ) {			
    				$data['message'] = __( 'Your message sent successfully.', 'advanced-classifieds-and-directory-pro' );				
    			} else {				
    				$data['error']   = 1;
    				$data['message'] = __( 'Sorry! Please try again.', 'advanced-classifieds-and-directory-pro' );				
    			}			
    		} else {		
    			$data['error']   = 1;
    			$data['message'] = __( 'Invalid Captcha: Please try again.', 'advanced-classifieds-and-directory-pro' );			
    		}
    				
    		echo wp_json_encode( $data );
    		wp_die();	
    	}
    	
    	/**
    	 * Send contact email.
    	 *
    	 * @since 1.0.0
    	 */
    	public function ajax_callback_send_contact_email() {	
    		check_ajax_referer( 'acadp_ajax_nonce', 'security' );
    		
    		$data = array( 'error' => 0 );
    		
    		if ( acadp_is_human('contact') ) {		
    			if ( acadp_email_listing_owner_listing_contact() ) {			
    				// Send a copy to admin( only if applicable ).
    				acadp_email_admin_listing_contact();
    				
    				$data['message'] = __( 'Your message sent successfully.', 'advanced-classifieds-and-directory-pro' );				
    			} else {				
    				$data['error']   = 1;
    				$data['message'] = __( 'Sorry! Please try again.', 'advanced-classifieds-and-directory-pro' );				
    			}			
    		} else {		
    			$data['error']   = 1;
    			$data['message'] = __( 'Invalid Captcha: Please try again.', 'advanced-classifieds-and-directory-pro' );			
    		}
    			
    		echo wp_json_encode( $data );	
    		wp_die();	
    	}
    
    }
    
    #306439
    xailaes
    Participant

    Hello

    I need help to hide administrators in member widget.

    I have a code that hides the administrators from the member list but they keep appearing in the members widget, active users and online users

    Thank you

    #306086
    jennifersanchez
    Participant

    Hi.

    Im using this code to hide the tabs in the profile’s visitor

    function bpfr_hide_tabs() {
    global $bp;
    
    	
    
    	if( class_exists( 'bbPress' ) || bp_is_active ( 'groups' ) ) :
            
           
    	if ( bp_is_user() && !is_super_admin() && !bp_is_my_profile() ) {
    
          
    		bp_core_redirect( get_option('home') . '/members/' .  bp_core_get_user(). '/reviews' );
    		bp_core_remove_nav_item( 'friends' );
    		bp_core_remove_nav_item( 'groups' );
    	bp_core_remove_nav_item( 'activity' );
    	}
    	endif;
    }
    add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );

    but the line
    bp_core_redirect( get_option('home') . '/members/' . bp_core_get_user( ). '/reviews' ); dont works.
    i tried with this ('BP_DEFAULT_COMPONENT','reviews'); but this dont works..

    Thanks very much!!

    #304950
    Venutius
    Moderator

    If you go to Appearance/Menus in WP Admin, you should be able to edit the menu and delete those links. While you are there, click on Page Options on the top right of the page and make sure BuddyPress is checked.

    Note: it looks like you have multiple menus so you will have to select the correct menu to edit.

    Then you should see the BuddyPress menu links meta-box and you will see there’s a login link you can add to the menu. That should sort out your BuddyPress login, same with Register.

    I’ve got a site buddyuser dot com, I’ve created a beginners introduction to BuddyPress, you might want to take a look at that.

    It’s possible to hide menu links that you don’t want the general public to know about. There’s a few plugins that do this but one I use is https://wordpress.org/plugins/nav-menu-roles/ this adds a handy checkbox to allow you to stipulate who can see that menu item.

    thecomputergi
    Participant

    Hello,
    I was wondering if there is a plugin, or bit of code I could remove or add to make it where there is no possible way for me to see user’s private messages. Right now I can use the Export Personal Data tool or go to their profiles and click messages. I want to disable both of these features permanently.
    Thanks!

    #304339
    Venutius
    Moderator

    Hi there,

    My suggestion is that you add a new menu item “All” and create a new set of queries for the page then make that page the default landing page for the profile activity page. Here’s my code to do this:

    function bpex_set_member_default_nav() {
     
    		if ( ! bp_is_user_profile() && ! bp_is_user_activity() && ! bp_is_user() ) {
    		    return;
    	         }
    
                    bp_core_new_nav_default(
    		array(
    			'parent_slug'       => buddypress()->activity->id,
    		// other "activity" sub_nav slugs : personal favorites friends groups mentons
    			'subnav_slug'       => 'all-activity',
    			'screen_function'   => 'bp_activity_screen_all_activity'
    		)
    	);
    }
    add_action( 'bp_setup_nav', 'bpex_set_member_default_nav', 20 );
    
    add_action( 'bp_setup_nav', 'bpex_just_me_tab', 50 );
    add_action( 'bp_setup_admin_bar', 'bpex_admin_bar_add', 50 );
    
    function bpex_just_me_tab() {
    	
    	if ( ! bp_is_user_profile() && ! bp_is_user_activity() && ! bp_is_user() ) {
    		return;
    	}
    	
    	global $bp;
    	$user_id = bp_displayed_user_id();
    	
    		bp_core_new_subnav_item( array(
    			'name'            => _x( 'All', 'Profile activity screen sub nav', 'buddypress' ),
    			'slug'            => 'all-activity',
    			'parent_url'      => bp_core_get_user_domain( $user_id ) . 'activity/',
    			'parent_slug'     => 'activity',
    			'screen_function' => 'bp_activity_screen_all_activity',
    			'position'        => 10
    		) );
    
    }
    
    function bpex_admin_bar_add() {
    	
    	global $wp_admin_bar, $bp;
    
    	if ( ! bp_use_wp_admin_bar() || defined( 'DOING_AJAX' ) ) {
    		return false;
    	}
    
    	$user_id = get_current_user_id();
    	
    	if ( ! $user_id || $user_id == 0 || ! is_numeric( $user_id ) ) {
    		return;
    	}
    	
    	// Personal.
    	//$wp_admin_bar->remove_menu( 'my-account-activity-personal', 'my-account-activity' );
    
    	$wp_admin_bar->add_menu( array(
    		'parent'   => 'my-account-activity',
    		'id'       => 'my-account-activity-all-activity',
    		'title'    => 'All',
    		'href'     => bp_core_get_user_domain( $user_id ) . 'activity/all-activity/',
    		'position' => 10
    	) );
    }
    function bp_activity_screen_all_activity() {
    
    	do_action( 'bp_activity_screen_all_activity' );
    
    	bp_core_load_template( apply_filters( 'bp_activity_template_all_activity', 'members/single/home' ) );
    }
    
    function bp_activity_filter_all_activity_scope( $retval = array(), $filter = array() ) {
    
    	// Determine the user_id.
    	if ( ! empty( $filter['user_id'] ) ) {
    		$user_id = $filter['user_id'];
    	} else {
    		$user_id = bp_displayed_user_id()
    			? bp_displayed_user_id()
    			: bp_loggedin_user_id();
    	}
    
    	// Should we show all items regardless of sitewide visibility?
    	$show_hidden = array();
    	if ( ! empty( $user_id ) && $user_id !== bp_loggedin_user_id() ) {
    		$show_hidden = array(
    			'column' => 'hide_sitewide',
    			'value'  => 0
    		);
    	}
    
    	// Determine groups of user.
    	$groups = groups_get_user_groups( $user_id );
    	if ( empty( $groups['groups'] ) ) {
    		$groups = array( 'groups' => 0 );
    	}
    
    	// Determine the favorites.
    	$favs = bp_activity_get_user_favorites( $user_id );
    	if ( empty( $favs ) ) {
    		$favs = array( 0 );
    	}
    
    	// Determine friends of user.
    	$friends = friends_get_friend_user_ids( $user_id );
    	if ( empty( $friends ) ) {
    		$friends = array( 0 );
    	}
    
    	$retval = array(
    		'relation' => 'OR',
    		array(
    			'relation' => 'AND',
    			array(
    				'column'  => 'user_id',
    				'compare' => 'IN',
    				'value'   => (array) $friends
    			)
    		),
    		array(
    			'relation' => 'AND',
    			array(
    				'column' => 'component',
    				'value'  => buddypress()->groups->id
    			),
    			array(
    				'column'  => 'item_id',
    				'compare' => 'IN',
    				'value'   => (array) $groups['groups']
    			)
    		),
    		array(
    			'relation' => 'AND',
    			array(
    				'column' => 'user_id',
    				'value'  => $user_id
    			)
    		),
    		array(
    			'relation' => 'AND',
    			array(
    				'column'  => 'id',
    				'compare' => 'IN',
    				'value'   => (array) $favs
    			)
    		),
    		array(
    			'relation' => 'AND',
    			array(
    				'column'  => 'content',
    				'compare' => 'LIKE',
    
    				// Start search at @ symbol and stop search at closing tag delimiter.
    				'value'   => '@' . bp_activity_get_user_mentionname( $user_id ) . '<'
    			)
    		),
    		// We should only be able to view sitewide activity content for friends.
    		array(
    			'column' => 'hide_sitewide',
    			'value'  => 0
    		),
    
    		// Overrides.
    		'override' => array(
    			'filter'      => array( 'user_id' => 0 ),
    			'show_hidden' => true
    		),
    	);
    	
    
    	return $retval;
    }
    add_filter( 'bp_activity_set_all-activity_scope_args', 'bp_activity_filter_all_activity_scope', 10, 2 );

    Once you have done that you would also want to overload the buddypress/bp-templates/your-template/members/single/activity.php to make sure this new page contains the post update form:

    Change:

    if ( is_user_logged_in() && bp_is_my_profile() && ( !bp_current_action() || bp_is_current_action( 'just-me' ) ) )
    	bp_get_template_part( 'activity/post-form' );

    To:

    if ( is_user_logged_in() && bp_is_my_profile() && ( !bp_current_action() || bp_is_current_action( 'all-activity' ) ) )
    	bp_get_template_part( 'activity/post-form' );
    

    Note: with this method there is a danger of duplicating activity since a friend posting to a group would show up in the groups search as well as the friends search etc. so you may want to adjust the $retval criteria.

    Also you might want to add a post form for visiting users so they can leave a comment for the user, you could ad this:

    function bpex_load_mention_me() {
    	
    	if ( get_current_user_id() != bp_displayed_user_id() ) {
    		$_GET['r'] = bp_activity_get_user_mentionname( bp_displayed_user_id() );
    		bp_get_template_part( 'activity/post-form' );
    	}
    
    }
    
    add_action( 'bp_before_member_body', 'bpex_load_mention_me' );
    #303892

    In reply to: WordPress Dashboard

    Venutius
    Moderator

    The basic option is to set up a redirect for anyone but admin, that would involve adding some code to your functions.php. There’s probably plugins that d it, but it’s quite simple with code if you are happy with that.

    That would not stop links from appearing in the WordPress admin-bar / toolbar. Would you still want to give them access to the BuddyPress menu options via the toolbar?

    I’ve recently launched a BP specific Front End editor and I’ve included all the various hide admin code in that. You can choose to hide the admin-bar altogether or prune out the menu items you don’t want to display, such as the +New menu item.

    melodynest
    Participant

    First time poster! Hello everyone 🙂

    I am using: Marketplace One Social theme, WC Vendors, Woocommerce, BP Better messages (websocket upgrade).

    Is there a way to make the ability to start conversations only for admin? I am designing a freelancer type website where I only want the Admin to be able to connect buyers and sellers into a private conversation after the purchase has been made (to avoid circumvention). I want vendors and subscribers to have access to their messages, just not the ability to start a new one.

    I am thinking maybe CSS to hide compose features? Could that be the easiest solution?

    Thanks in advance for any ideas!

    #302952
    shanebp
    Moderator
    function bpfr_hide_admins_profile() {
    	
        $admin_ids = array( 1, 22, 48 );
    	
        if( bp_is_user() ) {
    	if ( in_array( bp_displayed_user_id(), $admin_ids ) && ! in_array( bp_loggedin_user_id(), $admin_ids ) ) {
    		bp_core_redirect( site_url() );
            }
        }
    	
    }
    add_action( 'bp_ready', 'bpfr_hide_admins_profile', 1 );
    #302946
    Kristian Yngve
    Participant

    It all works, thank you so much @shanebp!

    so if there are more than one admin profiles, i can just use commas?

    for eg:

    function bpfr_hide_admins_profile() {
         if( bp_is_user() && bp_displayed_user_id() == 1,2,3 && bp_loggedin_user_id() != 1,2,3 ) {
    	bp_core_redirect( site_url() );
         }
    }
    add_action( 'bp_ready', 'bpfr_hide_admins_profile', 1,2,3 );
    

    This to do like that correct?

    #302945
    shanebp
    Moderator

    I’m surprised that your code ever worked.

    Try:

    function bpfr_hide_admins_profile() {
         if( bp_is_user() && bp_displayed_user_id() == 1 && bp_loggedin_user_id() != 1 ) {
    	bp_core_redirect( site_url() );
         }
    }
    add_action( 'bp_ready', 'bpfr_hide_admins_profile', 1 );

    Of course – this assumes that there is only one site admin and the user_id for that admin is 1.

    #302941
    Kristian Yngve
    Participant

    Even after removing all probably issues in my plugins, functions and bp-custim.php, I can’t seem to get the ‘Deny access to admins profile not working’ to work:

    //deny access to admins profile. User is redirected to the homepage
    function bpfr_hide_admins_profile() {
    	global $bp; 
    	if(bp_is_profile && $bp->displayed_user->id == 1 && $bp->loggedin_user->id != 1) :
    		wp_redirect( home_url() );
    	exit;
    	endif;
    }
    add_action( 'wp', 'bpfr_hide_admins_profile', 1 );

    I have everything up to date as much as possible.

    Any ideas?

    Have also tried: bp_is_user()

    many thanks

    #302939
    sitesfromash
    Participant

    Hi. I noticed that the three options which BuddyPress offers in regards to field visibility is “Only Me”, “Friends Only”, and “Everyone”. If someone sets their preference of a field to “Only Me” or “Friends Only”, is it still possible for the admin to see it? If not, is there a method that I can implement to see it as an admin but to hide it to other members? Also, can I put this field into an additional column on the Users Admin Panel? Thanks for any assistance which you can provide me.

    #302676
    natiaz
    Participant

    Ok, I thought that.

    So basically I’m going to need to grant user manage_options capability and then hide every every admin menu except the groups one.

    Thanks!

    #302438
    msteimann
    Participant

    Thanks for your quick reply, Venutius!

    I have tried the WP 2015 Theme and got the same results. So I switched back to KLEO and noticed, that the xProfile fields do change to the desired visibility settings, AFTER the user clicks the SAVE SETTINGS button. So I guess I was confused by the fact that BEFORE you hit the save button there is a misleading visual feedback (the visibility term does not alter to the according setting the user has just changed it to, it still displays the same value as before).

    Could this be changed in the next release?

    My first problem still remains: the „change display name visibility option“ is displayed beneath the name field on the user Registration page. This doesn’t make sense, if the name’s visibility throughout BuddyPress network is mandatory. How can I get rid of this line? Does this line and it’s user changeable visibility options really not appear on a default install?

    In the WP Dashboard I cannot change the options for the primary Name field. Only the fields under the details tab can be altered by admin and set to be visibility-changeable by the user. (Hope you understand what I try to say 😉

    Regards,
    Martin

    Hide visibility option on registration page?

    #302398
    Artyom
    Participant

    Another question: i want to hide group menu for members (non-admins). How i can check user for group admin? I want to add a check before a template of menu. Something like – if(“check expression”) {menu code}. I need a check expression. Thank you!

    #302338
    karpolan
    Participant

    So what is a standard solution to hide Admin and other Staff profiles?

    #302153
    gcrea
    Participant

    Hi, I’m trying to remove the admin bar notification counter if it is zero, but show it otherwise. I’m using the following code, hope you can help! I have this in my footer file.

    $(function () {
    if (parseInt($(“#wpadminbar span.count”).text()) == 0) {
    //$(“.notification-counter”).hide();
    $(“#wpadminbar span.count”).hide();
    }
    });

    #282250
    Hanz17
    Participant

    Hi,

    after update to BP 4.0. I have problems with two BP functions – bp_displayed_user_id, bp_is_my_profile

    Fatal error: Uncaught Error: Call to undefined function bp_displayed_user_id() in ...wp-content/themes/socialize-child/functions.php:73 Stack trace: #0 ...wp-includes/class-wp-hook.php(286): hide_profile('') #1 ...wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #2 ...wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 ...wp-settings.php(450): do_action('init') #4 ...wp-config.php(84): require_once('/www/doc/www.lo...') #5 ...wp-load.php(37): require_once('/www/doc/www.lo...') #6 ...wp-admin/admin.php(31): require_once('/www/doc/www.lo...') #7 ...wp-admin/index.php(10): require_once('/www/doc/www.lo...') #8 {main} thrown in ...wp-content/themes/socialize-child/functions.php on line 73

    Thanks for help

    #280343
    antabc
    Participant

    Hi!

    Is it possible to hide members own pages from other users than admin.

    Example if I have users “user1” and “user2”.

    If User1 is in his own page “www.yourdomain.com/members/user1”

    User1 can acces to User2 own page by changing only url to “www.yourdomain.com/members/user2”

    #279732
    adrihessels
    Participant

    Hello Prashant Singh,

    In which file/directory you need to put the code. In other cases i’ve found /wp-content/plugins/bp-custom.php

    Trying this gives an error.

    Question: why is this option to hide adminstrators of other kind of roles not a default parameter?

Viewing 25 results - 51 through 75 (of 907 total)
Skip to toolbar