Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • @aboutm2 please paste this code snippet and check it as per your requirement.

    
    // Hide user name from BuddyPress profile
    function hide_user_name_from_profile() {
        if ( bp_is_active('xprofile') ) {
           ?>
    		<style>
    			.user-nicename{
    				display:none;
    			}
    		</style>
    	<?php
        }
    }
    add_action( 'wp', 'hide_user_name_from_profile');
    

    @neighborhoodnurturers0 These strings will be translated with the help of Loco Translation plugin.
    https://prnt.sc/DXGWPwAhVAIm


    Mohammad Imran
    Participant

    @imranmd

    @shubhuofficial The settings tab is also not visible if the user is viewing another user’s profile. This is the default functionality in BuddyPress.
    https://prnt.sc/UKnd4pO7_sjY


    Mohammad Imran
    Participant

    @imranmd

    @stephunique with the help of this code snippet, you can display the user bio on member directory.

    /**
    * User Bio on member directory.
    *
    * @return void
    */
    function display_user_bio_on_member_directory() {
    if ( ! bp_is_members_directory() ) {
    return;
    }
    global $members_template;
    $member_id = $members_template->member->id;
    $bio = get_user_meta($member_id, ‘description’, true);
    echo ‘<br>’;
    if( ! empty( $bio ) ){
    echo wp_trim_words( $bio, 60, ‘…’ );
    } else {
    echo esc_html( ‘Custom message for user bio is empty’ );
    }
    }
    add_action( ‘bp_directory_members_item_meta’, ‘display_user_bio_on_member_directory’ );


    Mohammad Imran
    Participant

    @imranmd

    @serranospc Please paste the error log that are help which type of issue you are facing and it is also help how to replicate the issue.

    function redirect_after_registration() {
    return home_url( ‘/your-page-name’ ); // Replace ‘/your-page-name’ with the URL of the page you want to redirect users to.
    }
    add_filter( ‘registration_redirect’, ‘redirect_after_registration’ );

    @manni65929 , try this

    add_action( 'bp_ajax_querystring', 'user_remove_mem_directory', 20, 2 );
    function user_remove_mem_directory( $query, $object ) {
    	if ( 'members' != $object ){
    		return $query;
    	}
    
    	$excluded_user = '1';// admin id to remove from the member directory
    
    	$args = wp_parse_args( $query );
    
    	if ( ! empty( $args['exclude'] ) ) {
    		$args['exclude'] = $args['exclude'] . ',' . $excluded_user;
    	} else {
    		$args['exclude'] = $excluded_user;
    	}
    
    	$query = build_query( $args );
    
    	return $query;
    
    }
Viewing 8 replies - 1 through 8 (of 8 total)
Skip to toolbar