Skip to:
Content
Pages
Categories
Search
Top
Bottom

Showing Profile Information


  • drinkingsouls
    Participant

    @drinkingsouls

    Hey guys,
    In BBpress each user has the ability to edit their profile users/USER/edit/
    Here they can add their name, their website link and their bio by default. However, this information is never actually displayed on their profile. Why is this?
    On users profiles it says:

    Forum Role: Keymaster

    Topics Started: 0

    Replies Created: 0

    But the information such as their name, bio and website link are not displayed. Why are there options to add this information to the profile if it remains private?
    How can I allow it to be displayed publically?
    Thanks,
    Chris

Viewing 5 replies - 1 through 5 (of 5 total)

  • Robkk
    Moderator

    @robkk

    In BBpress each user has the ability to edit their profile users/USER/edit/
    Here they can add their name, their website link and their bio by default. However, this information is never actually displayed on their profile. Why is this?

    The bio should show.

    https://bbpress.org/forums/profile/robkk/

    As for most of the other fields, not sure really. I know though they are just going off of WordPress’s profile fields, and whatever is added to that though. I don’t know why the devs haven’t put at least website there. Maybe it is easy for spammers to take advantage of that?? First Name and Last Name could make good choices to display on the users profile too.

    I will probably make a suggestion to the devs later to add more profile data to the user’s profile.

    You can of course display the data in the profile by editing a template or installing a plugin.

    Copy user-profile.php from the bbPress templates in the plugin to your child theme in a folder called bbpress.

    Just surround the code with conditionals to only display the information when the user has inputted any information.

    You have something like this for first name.

    <?php if ( bbp_get_displayed_user_field( 'first_name' ) ) : ?>
    
    	<p class="bbp-user-fname"><?php bbp_displayed_user_field( 'first_name' ); ?></p>
    
    <?php endif; ?>

    YOu can also use the plugin, to display the current fields and also custom fields.

    https://wordpress.org/plugins/bbp-profile-information/


    IndigoO
    Participant

    @indigoo

    It took me a ridiculous amount of time to find where to make this change and make it, and even then it is in the main bbPress code. I couldn’t get it to see anything I put in my child theme, because it is accessed through plugins, not themes. I know I’ll have to update the file again manually as soon as I update bbPress.

    Also, that plugin only allows you to add new fields, not display existing ones. Doesn’t it seem odd that you would be prompted to enter data in fields on user profile edit, but then not have any of them show on view? By default the user fields should be available to show, at least standard ones like description, website, and social media profiles.

    If you use that plugin to manually create some of those fields, your users will see two of each, the original ones that won’t show in view mode, and the custom ones you created. Not workable.

    So really I see nothing to do other than manually editing the user-profile.php file to line by line include each field you want to show. How are some people not caring about this? It just seems so fundamental to me. Why go all the way to something like BuddyPress when all you want is field data already being collected to actually show?


    paul899
    Participant

    @paul899

    How are some people not caring about this?

    You’re right, it’s so fundamental and useful, yet no one has done it. Maybe, they don’t know it that it’s a problem for us or non of us has told them about it.


    Robkk
    Moderator

    @robkk

    I couldn’t get it to see anything I put in my child theme, because it is accessed through plugins, not themes. I know I’ll have to update the file again manually as soon as I update bbPress.

    You don’t need to change anything in bbPress to do this type of thing, just put any template files in a child theme or custom theme package plugin (there is no info on this but this is possible too).

    https://codex.bbpress.org/themes/theme-compatibility/

    Also, that plugin only allows you to add new fields, not display existing ones. Doesn’t it seem odd that you would be prompted to enter data in fields on user profile edit, but then not have any of them show on view? By default the user fields should be available to show, at least standard ones like description, website, and social media profiles.

    This is the only plugin I can think of that might be easy for some users to display content. If you want contact Robin later in the support forum to see if he would add existing fields to it.

    How are some people not caring about this? It just seems so fundamental to me.

    There is a plan to add certain fields to the profile page in the future, mostly default existing fields for now.

    https://bbpress.trac.wordpress.org/ticket/2570


    sjc
    Participant

    @stevielovegun

    I had a similar need – to show the user’s bio on their replies – so sharing my solution here, a simple function created after having a look at this nifty little plugin by Robin W.

    function show_bio_bbp_replies () {
    $user_id = bbp_get_reply_author_id( $reply_id );
    $usermeta = get_userdata( $user_id, 'description' );
    echo '<p class="bbp-reply-user-bio">'.$usermeta->description.'</p>';
    }
    add_action ('bbp_theme_after_reply_author_details', 'show_bio_bbp_replies');
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar