Skip to:

Search Results for 'profile fields'

Viewing 25 results - 1 through 25 (of 4,848 total)
  • Author
    Search Results
  • Profile photo of dzturtleshell

    I’m creating a custom page that shows all members of a specific group.
    I need to make a box for each member that includes their avatar, name, and the data from one of the custom xProfile fields I’ve created for the community.

    I used the group_members loop and I have the avatar and name working.

    ‘<?php if ( bp_group_has_members(‘group_id=1’) ) : ?>
    <ul id=”member-list” class=”item-list”>
    <?php while ( bp_group_members() ) : bp_group_the_member(); ?>

  • <?php bp_group_member_avatar_mini($width = 50, $height = 50) ?>
    <?php bp_group_member_link() ?>
  • <?php endwhile; ?>

    <?php else: ?>
    <div id=”message” class=”info”>
    <p>Something went wrong!</p>
    <?php endif;?>’

    I don’t know how to access the xProfile field I want so I can add it to the loop. I know the profile group_id=1 and the profile field_id=9, but I can’t find anywhere how the profile field_id is linked to a members user_id, so I can’t figure out how to add it to the group_members loop. I think it should look something like this:

    function bp_group_member_location() {
    echo bp_get_group_member_location();

    function bp_get_group_member_location() {
    global $members_template;
    // Write code here to return the value of profile group_id=1&field_id=9 for member

    But I don’t know if I should even be looking for the custom profile fields data in the $member_template (which I can’t actually find to see what it does contain)

    Any advice or suggestions would be greatly appreciated, even if it’s just to let me know I’m completely off… I am a beginner and this is my first post here. Please comment if you need more info to be able to answer my question. (I am using BP 2.7.2 and WP 4.6.something)

    Thanks in advance!

    Profile photo of tergra

    Found the source of the issue. I had put the field (First name (Base)) in another group of fields, because it only makes the registration process longer and doesn’t bring anything valuable to the site. But when yo do so, it breaks the registration process for some reason. It no longers makes the required verifications.. I’m now implementing the solution of changing is_required described here by ModemLooper :
    It seems to work, I only have a issue with the css (I put a big div with display none before xprofile fields and I’m closing it at the end, just before the submit button, but it puts the submit button on the right as if the xprofile field was there, weirdly/

    Buddypress should really have that in core as this required Xprofile field is really not user-friendly AT ALL. 😉

    Thanks everyone ! 🙂

    Profile photo of mrizwanghuman

    We are hosting our blog in a subdirectory (, not a subdomain ( We are fetching content behind reverse proxy from server B.

    Users cannot upload their buddy-press profile avatar.

    Here is header

    Request URL:
    Request Method:POST
    Status Code:302 Moved Temporarily.
    I tried following code

    withCredentials: true
    Your help will be greatly helpful. I already setup header for other ajax call to

    headers[‘Access-Control-Allow-Origin’] = “*”

    Profile photo of mkricard

    Can anymore provide some guidance on hiding BuddyPress user profile fields and custom tabs from non-logged in users?

    I’ve been trying to figure out how to prevent non-logged in users from viewing my BuddyPress pages, but I can’t seem to quite make everything work. So far, I’ve been able to figure out how to restrict access to the Members page and redirect non-logged in users to the login page. I put the following code in my bp-custom.php file, which is in my plugins folder. I got the code from this BuddyPress forum page (

     * Change BuddyPress default Members landing tab.
    define('BP_DEFAULT_COMPONENT', 'profile' );
    /* Prevent logged out users from accessing bp activity page */
    function nonreg_visitor_redirect() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bp_is_page( BP_MEMBERS_SLUG ) ) {
    if(!is_user_logged_in()) { //just a visitor and not logged in
    wp_redirect( get_option('siteurl') . '/wp-login.php' );

    However, non-logged in users can still view each user’s page and their profile tabs. How can I restrict access to those pages as well? I’d rather not use another plugin.

    Profile photo of danbp

    Is “xprofile component” the feature exposed in “Settings > BuddyPress” named “Extended Profiles” (at the very top of the config page)? (It probably is, but I just want to be sure, thanks.)

    Yes it is !

    it is possible […] to effect the change of either the email or password fields?

    Yes it is ! from here: – the link can be found under the top right usermenu on wp’s toolbar: username > settings > general OR/AND on the buddymenu, when you’re on your profile: Settings ! And that’s it !


    For all other BP related questions, please read through the codex, i really have no time to (re)write all explanations. Sorry, hope you uderstand.

    Profile photo of Jay

    Thanks for the background info about WP, @danbp. It certainly is interesting to see how the little old single-user blog platform called “WordPress” has mushroomed into the gargantuan that it is today, following the old adage, “Man expands to fill the available space.”

    Obviously I’m a bit of a noobie to WordPress (I’ll admit, so feel free to flame away ;)), but I’d like to ask about your reference to the clause “When BP is activated, and if you use the xprofile component…” I am a bit confused about “the xprofile component” and was wondering if you can help me understand it a bit better.

    Is “xprofile component” the feature exposed in “Settings > BuddyPress” named “Extended Profiles” (at the very top of the config page)? (It probably is, but I just want to be sure, thanks.)

    I am fully cognizant of the fact that one can preclude access to the WP Dashboard in a number ways, including by Role, etc., and I plan to do that. However, that causes me to provide exposure to the standard WP Profile fields (or as many of thsoe fields that I want to expose, that is) so that the user can modify them. This includes the critical email and password fields.

    Relating to this situation, you didn’t quite address my key question as to whether it is possible (without serious WP core hacking — something I would NEVER do, btw) to effect the change of either the email or password fields?

    Now listen, I realize that probably sounds like a shameless noobie question, but it really begs the question of whether modifying the email/password fields outside of the WP dashboard is considered “bad form” in some way.

    Thanks in advance for your advice and insights.

    Profile photo of danbp


    BuddyPress use templates to show his stuff.
    The registration is part of WP and BP’s xprofile component add only some additionnal fields to the original register form.

    If you open a template file you will see a lot of code and many lines starting by do_action( ‘something’ );

    These files are all stored in bp-templates/bp-legacy/buddypress/

    Now you have already the where and the what. here’s the how.

    To show some text on the register page you have two options:
    1) altering the whole template file bp-templates/bp-legacy/buddypress/members/register.php
    2) add what you want by using an action hook

    The second method is the fasted and the easiest. You just need to write a function and you’re done.

    function valeriemanne() {
       echo 'Here i am !';
    add_action( 'bp_before_register_page', 'valeriemanne' );

    Add this to your child theme functions.php file or into bp-custom.php

    WordPress codex references
    Child theme


    In reply to: show random profile

    Profile photo of mrblade

    Hi! Thank you for your answer!
    But I need a page showing the profile (and not a list) of a random user.
    I was thinking of using the standard loop with type = random and limit of one. And use the filter fields, as described here
    is this the correct way?

    Profile photo of sweeneytodd94

    (Latest version of WP/BP; non-bundled custom theme, using child theme.)

    When adding a custom index & members-loop to /members/ in my child-theme, to make some adjustments to the members directory layout, individual profile pages break completely, I think defaulting to the pages.php but loaded without any content.


    //global $members_template;
    //$reset_members_template = $members_template;
    do_action( 'bp_before_members_loop' ); ?>
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&per_page=21&type=alphabetical' ) ) : ?>
    	<div id="pag-top" class="pagination">
    		<div class="pag-count" id="member-dir-count-top"><?php bp_members_pagination_count(); ?></div>
    		<div class="pagination-links" id="member-dir-pag-top"><?php bp_members_pagination_links(); ?></div>
    	<?php do_action( 'bp_before_directory_members_list' ); ?>
    	<ul id="members-list" class="item-list" role="main">
    	<?php while ( bp_members() ) : bp_the_member(); ?>
    			<div class="item-avatar">
    				<a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar('type=full&width=80&height=80'); ?></a>
    			<div class="item">
    				<div class="item-title"><a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a></div>
    				<div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div>
    				<?php do_action( 'bp_directory_members_item' ); ?>
    			<div class="action">
    				<?php do_action( 'bp_directory_members_actions' ); ?>
    			<div class="clear"></div>
    	<?php endwhile; ?>
    	<?php do_action( 'bp_after_directory_members_list' ); ?>
    	<?php bp_member_hidden_fields(); ?>
    	<div id="pag-bottom" class="pagination">
    		<div class="pag-count" id="member-dir-count-bottom"><?php bp_members_pagination_count(); ?></div>
    		<div class="pagination-links" id="member-dir-pag-bottom"><?php bp_members_pagination_links(); ?></div>
    <?php else: ?>
    	<div id="message" class="info"><p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p></div>
    <?php endif; 
    //$members_template = $reset_members_template;
    <?php do_action( 'bp_after_members_loop' ); ?>


     * BuddyPress - Members Directory
     * @package BuddyPress
     * @subpackage bp-default - SSSMG
    get_header( 'buddypress' ); ?>
    	<?php do_action( 'bp_before_directory_members_page' ); ?>
    <div class="container">
    <div class="row">
    <div id="primary" class="col-md-10">
    	<div id="content" role="main" class="<?php do_action( 'content_class' ); ?>">
    		<div class="padder">
    		<div class="buddypress">
    		<?php do_action( 'bp_before_directory_members' ); ?>
    	<form action="" method="post" id="members-directory-form" class="dir-form">
    	<?php do_action( 'bp_before_directory_members_content' ); ?>
    	<div id="members-dir-search" class="dir-search" role="search">
    		<?php bp_directory_members_search_form(); ?>
    	</div><!-- #members-dir-search -->
    	<?php do_action( 'bp_before_directory_members_tabs' ); ?>
    		<div class="item-list-tabs" role="navigation">
    				<li class="selected" id="members-all"><a href="<?php bp_members_directory_permalink(); ?>"><?php printf( __( 'All Members %s', 'buddypress' ), '<span>' . bp_core_get_total_member_count() . '</span>' ); ?></a></li>
    				<?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
    					<li id="members-personal"><a href="<?php echo bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/'; ?>"><?php printf( __( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' ); ?></a></li>
    				<?php endif; ?>
    				<?php do_action( 'bp_members_directory_member_types' ); ?>
    		</div><!-- .item-list-tabs -->
    		<div id="members-dir-list" class="members dir-list">
    			<?php //bp_get_template_part( 'members/members-loop' );
    				locate_template( array( 'members/members-loop.php' ), true );
    		</div><!-- #members-dir-list -->
    		<?php do_action( 'bp_directory_members_content' ); ?>
    		<?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?>
    		<?php do_action( 'bp_after_directory_members_content' ); ?>
    	</form><!-- #members-directory-form -->
    	<?php do_action( 'bp_after_directory_members' ); ?>
    </div><!-- #buddypress -->
    </div><!-- .padder -->
    	</div><!-- #content -->
    </div><!-- primary -->
    <?php get_sidebar( 'buddypress' ); ?>
    </div><!-- row -->
    </div><!-- container -->
    	<?php do_action( 'bp_after_directory_members_page' ); ?>
    <?php get_footer( 'buddypress' ); ?>


    // bp-custom.php - BP hacks and mods will go here
     * Include bbPress 'topic' custom post type in WordPress' search results */
    function ntwb_bbp_topic_cpt_search( $topic_search ) {
    	$topic_search['exclude_from_search'] = false;
    	return $topic_search;
    add_filter( 'bbp_register_topic_post_type', 'ntwb_bbp_topic_cpt_search' );
     * Include bbPress 'forum' custom post type in WordPress' search results */
    function ntwb_bbp_forum_cpt_search( $forum_search ) {
    	$forum_search['exclude_from_search'] = false;
    	return $forum_search;
    add_filter( 'bbp_register_forum_post_type', 'ntwb_bbp_forum_cpt_search' );
     * Include bbPress 'reply' custom post type in WordPress' search results  */
    function ntwb_bbp_reply_cpt_search( $reply_search ) {
    	$reply_search['exclude_from_search'] = false;
    	return $reply_search;
    add_filter( 'bbp_register_reply_post_type', 'ntwb_bbp_reply_cpt_search' );
     * Ensure that multiselect boxes have trailing brackets in their 'id' and 'name' attributes.
     * These brackets are required for an array of values to be sent in the POST
     * request. Previously, bp_get_the_profile_field_input_name() contained the
     * necessary logic, but since BP 2.0 that logic has been moved into
     * BP_XProfile_Field_Type_Multiselectbox. Since bp-default does not use the
     * BP_XProfile_Field_Type classes to build its markup, it did not inherit
     * the brackets from their new location. Thus this workaround.
    function bp_dtheme_add_brackets_to_multiselectbox_attributes( $name ) {
    	global $field;
    	if ( 'multiselectbox' === $field->type ) {
    		$name .= '[]';
    	return $name;
    add_filter( 'bp_get_the_profile_field_input_name', 'bp_dtheme_add_brackets_to_multiselectbox_attributes' );
    // add the custom column headers to BP manage signups
    function philopress_modify_user_columns($column_headers) {
            $column_headers['extended'] = 'Extended';
            return $column_headers;
    // dump all the pending user's meta data in the custom column
    function philopress_signup_custom_column( $str, $column_name, $signup_object ) {
    	if ( $column_name == 'extended' ) 
                 return print_r( $signup_object->meta, true );
            return $str;
    add_filter( 'bp_members_signup_custom_column', 'philopress_signup_custom_column', 1, 3 );
    //* Redirect WordPress Logout to Home Page
    //add @mentions to bbpress forum
    function custom_bbpress_maybe_load_mentions_scripts( $retval = false ) {
    	if ( function_exists( 'bbpress' ) && is_bbpress() ) {
    		$retval = true;
    	return $retval;
    add_filter( 'bp_activity_maybe_load_mentions_scripts', 'custom_bbpress_maybe_load_mentions_scripts' );
    function bphelp_dpioml(){
    	$bphelp_my_profile_field_2='Primary Institution';
           if( is_user_logged_in() && bp_is_members_component() ) { ?>
            <div class="bph_xprofile_fields">
                              <?php if(bphelp_my_profile_field_1<>"") echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_1 );  ?><br />
    						  <?php if(bphelp_my_profile_field_2<>"") echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_2 );  ?><br />
    add_action('bp_directory_members_item', 'bphelp_dpioml');

    I’ve tried all sorts of different combinations but whatever I do, the only way to get both the profile pages and the members directory to display is to remove the index and members-loop customizations. Then everything works fine, but without the adjustments to the members directory that I want (removing recent updates, for instance). Any pointers would be brilliant!

    Profile photo of shanebp

    Did you see this?

    For a single field, follow the directions in the code.

    Profile photo of fleminglabs

    Is there any progress on this?

    My client needs people to input a product number to sign up for the website.

    There are lots of “pending” users but I cannot see the custom Profile fields to review what the new user has put in.

    There is no other way of looking at that?

    The clients needs to be able to do it and lots of them, the url trick will be too hard.

    Profile photo of Adjunkten

    One solution might be to simply display the xprofile fields, that you want to be searcable in the member directory.
    Then you can simply use the member search form to search for xprofile content.

    My members have a field with ‘school’

    This snippet adds two profile fields to the members loop – add the code to your bp-custom.php:

    function add_info_to_members_loop() {
        $field_content = bp_get_member_profile_data( 'field=(Xprofile Field name)' );
        if( $field_content != false )
          echo "(label for xprofile field content): " . $field_content;
        $field_content = bp_get_member_profile_data( 'field=(Xprofile field name #2' );
        if( $field_content != false )
          echo "<br/>" . $field_content;
    add_action( 'bp_directory_members_item', 'add_info_to_members_loop' );

    Just an idea.

    Kind regards, Lars


    In reply to: bbp-register layout

    Profile photo of Venutius

    The basic layout of the items on the right side of the registration screen can be affected by moving the fields around in Dashboard>>User>>Profile Fields.

    You can drag and drop them and that will affect the order that they are displayed.

    An alternative might be to install BP Better Registration, which creates a different type of registration process.

    You might benefit from visiting my website It’s aimed at newbies looking to get the most out of BuddyPress.

    Profile photo of shanebp

    In reply to: Profile Page and Bio

    Profile photo of Venutius

    Hi there,

    You might like to check out my page on setting up users

    Setting up Site Members with BuddyPress

    This includes details of adding additional profile fields to the users profile. Also check out the section “Installing BP” in my site, I’m sure it will give you a lot of useful information.

    Profile photo of mthant

    I have buddyPress 2.7.2 installed. I notice that in the profile section it does not have fields to fill other information except name and photo. When I press the edit tab it allows only to change name and there is a tab to change the photo.
    I notice that in demos on other wordpress themes that have buddyPress, it shows fields such as Age, Bio. Are these fields deleted?
    I am a newbie to WordPress and BuddyPress

    Profile photo of eavinu

    I need a plugin that will create a new tab or several tabs in the profile of a Group Admin with the following options:

    1. access to view and edit the profile fields (both wp and bp xprofile fields) of the specific group members. As well the option to ad a new user and assign him to the group. (the last is not mandatory since the group admin can always log out and simply create a new user with the user details and then log in back to the group admin account andm manage etc’).
    2. access to view, edit and also add WC purchases of the specific group members. (add new orders for a member that paid in cash to the group admin for example).

    The website is mainly using the following plugins at the moment:
    wordpress 4.4.2
    Buddypress 2.7.2
    woocommerce 2.6.7
    wc4bp 2.5
    wc4bp xprofile checkout manager 1.2.1
    Buddypress registration groups
    capability manager enhanced – using this I created a role called Group Admin but now it needs to have the above capabilities created and assigned to it I guess.

    A bit more info on what I need is on this post along with a general answer regarding the approach to take in order to accomplish this:

    Allow group admin to view group members woocommerce purchases

    Despite the fact that it shouldn’t be too complicated, this is my first encounter with BP and therefore need someone with knowledge that could help with this within several days, so please contact me only if you are available.

    Thanks for reading and looking forward to get offers or at least approximate schedule.
    Feel free to contact me in a message here or directly to my email

    Profile photo of conmurray

    Using BP2.7.1

    My BP installation for some reason has two Base Primary tabs under Profile Fields. The First tab shows two Name (Primary) (Required) Fields and both of these show on my signup forms. The second tab has nothing on it.

    I can’t see what is causing the issue but how do I get rid of them?

    Thanks in anticipation.


    In reply to: User WYSIWYG Editor

    Profile photo of Venutius

    For profile fields you can enable a rich text editor with

    Profile photo of siqve006
    dev grl

    Is there a way to require a profile pic upon registration? I cannot see the option to set up a field for that in the form fields, but would like to do this.

    Profile photo of siqve006
    dev grl

    I used this plugin to achieve a personal and business version of my user registration based on conditional settings: but now when I’m logged in as the user and want to go into my account and edit the profile fields..I cannot get see all of the fields that I want to edit.

    Profile photo of matt2006

    Hi @danbp
    thanks for your Tipp.

    he problem is, that BP Auto Group Join lets me add users to groups only by “Member Types” not by vustom xProfile fields.

    Is there anyone here, who could customize the plugin for us?

    The intended data flow would be:
    Input via Gravity Forms -> Gravity Forms User Registration Add-On adds a new user with certain xProfile information -> Modified “BP Auto Group Join” adds new user to certain BP groups.

    Thanks for helping!

    For your information:
    I manage this project for a Non-Profit-Organsation called “Economy for the common good”, which stives for a new economic system. He have associations all over Europe which are recognised as charitable.
    Please see here for more Info:

    Profile photo of davehakkens

    OK, we got it to work in a different way. Special thanks to @coffeywebdev for the help.
    For those interested:

    This snippet is used in the functions.php to get the locations from the profile fields and show the flag image.

    function dh_get_flag_by_location($country){
      if($country <> '' && !empty($country)){
      $country_filename = get_stylesheet_directory_uri() . '/img/flags/' . sanitize_file_name($country) . '.png';
      $country_path = get_stylesheet_directory() . '/img/flags/' . sanitize_file_name($country). '.png';    
           $html = '<img src="' . $country_filename . '"/>';
         } else {
           $html = $country;
           echo '<!--' . get_stylesheet_directory_uri() . '/img/flags/' . sanitize_file_name($country) . '-->';
      echo $html;

    Then we needed to change 2 templates to show this flag image in
    the Bbpress forum replies and on the buddypress members page. So we added the code necessary to show the flag
    <div id="country" style="float:left;margin-right:.5em;"> <?php $user = get_userdata( bbp_get_reply_author_id() ); $country = xprofile_get_field_data( 42, $user->ID ); dh_get_flag_by_location($country); ?></div>

    <div class="member-location"> <?php $country = bp_get_member_profile_data('field=Location'); dh_get_flag_by_location($country); ?></div>

Viewing 25 results - 1 through 25 (of 4,848 total)
Skip to toolbar