New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Tiffany,
    We have looked into the plugin but are unable to replicate the error. There was no “IN, NOT In” operator support.

    Do you have any staging site where i can check your profile fields and the Rules for sugegstions.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi,
    Thank you for sharing the details.

    You can remove the plugin and put this code in theme theme’s functions.php

    
    
    /**
     * Xprofile data shortcode.
     */
    add_shortcode( 'bpc-profile-data', function ( $atts = array(), $content = null ) {
    
    	$atts = shortcode_atts(
    		array(
    			'context' => '', // logged, displayed, author
    			'user_id' => 0,
    			'field'   => '',
    		),
    		$atts
    	);
    
    	if ( empty( $atts['field'] ) ) {
    		return '';
    	}
    
    	$user_id = 0;
    	switch ( $atts['context'] ) {
    
    		case 'displayed':
    			$user_id = bp_displayed_user_id();
    			break;
    		case 'logged':
    			$user_id = get_current_user_id();
    			break;
    		case 'author':
    			$user_id = get_the_author_meta( 'ID' );
    			break;
    		default:
    			if ( $atts['user_id'] ) {
    				$user_id = $atts['user_id'];
    			} elseif ( in_the_loop() ) {
    				$user_id = get_the_author_meta( 'ID' );
    			} elseif ( bp_is_user() ) {
    				$user_id = bp_displayed_user_id();
    			} elseif ( is_user_logged_in() ) {
    				$user_id = get_current_user_id();
    			}
    	}
    
    	if ( ! $user_id ) {
    		return '';
    	}
    
    	return xprofile_get_field_data( $atts['field'], $user_id, 'comma' );
    
    } );
    
    

    Now, you can use the shortcode like this

    
    [bpc-profile-data field="About" ]
    

    You can use either the content or the user_id parameter to pass user context or id.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Carsten,
    I am sorry for the delayed reply.

    By mistake, I had made the code to show the data only if the “Age” was set. Please use this instead

    
    
    /**
     * Buddypress Show Xprofile Field Data in The Profile Header.
     */
    
    function yzc_add_xprofile_field_data_in_profile_header( $name ) {
    
    	$field_data = xprofile_get_field_data( 'Age', bp_displayed_user_id() );
    
    	echo "<div class='profile-job-info'>";
    
    	echo '<br/><strong>Alder:</strong> ' . $field_data;
    
    	$field_data = xprofile_get_field_data( 'From', bp_displayed_user_id() );
    	if ( ! empty( $field_data ) ) {
    		echo '  <br/> <strong>Fra:</strong> ' . $field_data;
    
    		$field_data = xprofile_get_field_data( 'Job', bp_displayed_user_id() );
    		if ( ! empty( $field_data ) ) {
    			echo '<br/><strong>Job:</strong> ' . $field_data;
    
    		}
    
    		echo '</div>';
    	}
    }
    
    add_action( 'bp_before_member_header_meta', 'yzc_add_xprofile_field_data_in_profile_header' );
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi,
    Thank you for the reply.

    In community Builder 2.x, the only way to reorder nav is to either use BuddyPress Reorder Profile Tabs plugin or BuddyPress User Profile Tabs Creator Pro.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Khalid,
    Thank you for letting us know. I am glad it is resolved.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi,
    Thank you for the topic.

    We do have a plugin for the same. I am asking @ravisharma to look into it and release.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: buddypress cover photo in crop format #36718

    Hi,
    Thank you for the questions.

    We are unable to assist you with the implementation if you are looking for a crop user interface like avatar uploader.

    If you want to set a hard crop instead of resizing(without any UI), please let me know. We will assist you.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: Buddy press profile tabs #36717
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Thank you Tosin.

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Deepa,
    Thank you for using the plugin and sharing the details.

    The code

    
    <span class=”bp-screen-reader-text”>Report</span>
    

    is not from our plugin. Are you using any 3rd party plugin for the same or does you theme provide this? Please try disabling the “Activity” module in the Moderation Tools plugin and let me know if both the button goes away or just one?

    Thank you
    Brajesh