This topic has 4 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #149638
     gfisch
    Participant

    Featured photo in profile header
    ———————————————
    I have put settings to show rtMedia photos in the profile header area. It works.

    I now found a tutorial at rtmedia how to set featured photos instead of the new photos in the profile header area.
    https://rtmedia.io/docs/developers/featured-media/
    That’s an interesting option.

    But I cannot get it to work. I have
    put  a copy of member-header.php in sweetdate.child : members : single folder.
    Is this correct, to begin with?

    But even then, I cannot find the mentioned code segment to change

    COPY CODE
        <?php if ( bp_is_active( 'activity' ) ) : ?>

    Is there another way to do it?

    Specific fields in profile header
    ———————————————

    While reading the code in member-header.php I found

    * If you’d like to show specific profile fields here use:
    * bp_member_profile_data( ‘field=About Me’ ); — Pass the name of the field
    */
    do_action( ‘bp_profile_header_meta’ );

    This is an interesting option as well and I would like to try that too, to see what works better for me.
    But I don´t know where to put, lets say in my case, those 5 fields

    bp_member_profile_data( ‘field=COUNTRY );
    bp_member_profile_data( ‘field=CITY’ );
    bp_member_profile_data( ‘field=AGE / BIRTHDAY’ );
    bp_member_profile_data( ‘field=I AM A’ );
    bp_member_profile_data( ‘field=LOOKING FOR’ );

    Before this line?
    do_action( ‘bp_profile_header_meta’ );

    Do I have to select something in these settings for the custom fields to show?
    Sweetdate : BP Profile Tabs

    Thanks
    George

    #149840
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

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

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #149996
     Radu
    Moderator

    Hi,

    YEs the path it’s correct ( wp-content/themes/sweetdate-child/members/single ).

    This part of code isn’t part of our theme

    COPY CODE
    
    <span class="pl-s1">    <span class="pl-k"><</span>?<span class="pl-c1">php</span> <span class="pl-k">if</span> ( bp_is_active( <span class="pl-s"><span class="pl-pds">'</span>activity<span class="pl-pds">'</span></span> ) ) : </span><span class="pl-pse"><span class="pl-s1">?</span>></span>
    

    The guidance from rtmedia site it applies only for wp default theme, where you want to run that code ?

    Anyways the sweetdate theme already has a photos tab

    You can use those codes “” in same file member-header.php

    But make sure to have exact name fields like you have added in wp-admin -> users -> profile fields.

    Cheers
    R.

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

    Thanks Radu, understood. I can show both. “About” me and “My Photos” in the member header. Great. I was not aware of that.

    But somehow it seems I do something wrong with the code.

    I put this in member-header.php (in the child folder) but it still displays ALL fields. Is it because all my fields are (deliberately) in the primary group?

    Can I not only select SOME fields from the primary group?

    Here is the code I am using (the names are correct).

    <?php
    /***
    * If you’d like to show specific profile fields here use:
    * bp_member_profile_data( ‘field=About Me’ ); — Pass the name of the field
    */
    bp_member_profile_data( ‘field=AGE / BIRTHDAY’ );
    bp_member_profile_data( ‘field=COUNTRY’ );
    bp_member_profile_data( ‘field=CITY’ );
    bp_member_profile_data( ‘field=I AM A’ );
    bp_member_profile_data( ‘field=LOOKING FOR’ );
    bp_member_profile_data( ‘field=HEIGHT’ );
    bp_member_profile_data( ‘field=WEIGHT’ );
    bp_member_profile_data( ‘field=POSITION’ );
    do_action( ‘bp_profile_header_meta’ );
    ?>

    #150124
     Radu
    Moderator

    Hi,

    By default, the fields from Base (primary group) are displayed on about me section from the profile

    If you want to display a certain one use from example : member-header.php file under user nicename or wehere you need, it works i’ve tested on my local install.

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?