Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • nhalation
    Participant

    @nhalation

    Well, with a bit more Googling I’ve gotten this solved for the most part. I know these pages get indexed so here’s what I did for anyone’s future reference. For this example’s sake I’ll just cover the “Member Since” field.

    – Created a copy of profile-loop.php in the appropriate child theme directory for update-safe modification.

    – In the child copy of profile-loop.php, right beneath <?php do_action( 'bp_after_profile_field_content' ); ?>, which is inside (and at the bottom) of the ‘if ( bp_profile_group_has_fields())’ if check, I put the following code to output this field for the base group only (assuming the base group has an ID of 1):

    <?php if ( bp_get_the_profile_group_id() == 1 ) : ?>
      <table class="profile-fields">
       <tr<?php bp_field_css_class(); ?>>
        <td class="label">Member Since</td>
        <td class="data"><?php bp_custom_profile_fields(); ?></td>
       </tr>
      </table>
     <?php endif; ?>

    And then finally, in my child theme’s functions.php file (this could probably also go in bp-custom.php) I found and pasted this code to define and format the join date:

    function bp_custom_profile_fields() {
        global $bp;
        $currentuser = get_userdata( $bp->displayed_user->id );
        $joined = date("F jS, Y", strtotime($currentuser ->user_registered));
        echo '' . $joined . '';
    }
Viewing 1 replies (of 1 total)
Skip to toolbar