This topic has 5 replies, 3 voices, and was last updated 10 years by Abe.

  • Author
  • #8640
     ACTasarim
    Participant

    Hello

    I’m using the theme for another purpose than dating and I’ve created 3 profile fields for Name, Surname and Occupation. I want to show them like <h2>Name Surname</h2> and instead of nicename & activity I want to show Occupation above the profile photo. Like this

    NAME SURNAME
    Designer
    <profile photo>

    I’m trying to edit the member-header.php file and I can see that there is:
    <h2><?php bp_displayed_user_fullname(); ?></h2>
    and
    <span class=”user-nicename”>@<?php bp_displayed_user_username(); ?></span>
    <span class=”activity”><i class=”icon-time”></i> <?php bp_last_activity( bp_displayed_user_id() ); ?></span>

    Is that the right file to edit and how can I add my new profile fields? Great theme for all purposes by the way
    Thanks…

    #8641
     adam
    Participant

    I have done something similar. That is the right place. Add this:
    <?php bp_member_profile_data( ‘field=Occupation’ )?>

    This is assuming your field name is Occupation. If not, change that to whatever the field name is.

    #8642
     adam
    Participant

    you can also try:

    COPY CODE
    
    <h2><?php bp_member_profile_data( 'field=Name' )?>&nbsp<?php bp_member_profile_data( 'field=Surname' ); ?></h2>
    

    For the name as you want it displayed.

    #8696
     ACTasarim
    Participant

    That worked great thank you Adam 🙂

    #8698
     ACTasarim
    Participant

    Btw I saw a php code in members-loop.php —-> <?php do_action(‘bp_members_meta’);?>

    In order to show this Name Surname style everywhere in my site and make this perfect, can I add
    <h2><?php bp_member_profile_data( 'field=Name' )?>&nbsp<?php bp_member_profile_data( 'field=Surname' ); ?></h2> style

    to members_meta variable?

    #8726
     Abe
    Keymaster

    Hi, That is a hook that just renders added content using add_action wordpress function.
    Read more: http://codex.wordpress.org/Function_Reference/do_action

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?