Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author donmik

    (@atallos)

    In the members page, you can check if you are going to display Date of birth field and change the label by Age.

    The code looks like this:

    <?php if (bp_get_the_profile_field_name() == 'Date of birth'): ?>
    <td class="label">Age</td>
    <?php else: ?>
    <td class="label"><?php bp_the_profile_field_name(); ?></td>
    <?php endif; ?>
    Thread Starter ultimateuser

    (@ultimateuser)

    Thanks for the reply.

    Do I put this code in functions.php? My theme also has a functions-buddypress.php

    When putting the code in functions.php I get the following error:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/user/domain.com/wp-content/themes/Child-Theme/functions.php:4) in /home/user/domain.com/wp-content/themes/Theme/functions.php on line 1

    Hope you can help!

    Plugin Author donmik

    (@atallos)

    No, you need to put it in the members page. If you are using the default buddypress theme, search in:

    /wp-content/plugins/buddypress/bp-themes/bp-default/members/single/profile/profile-loop.php

    You need to search this line:

    <td class="label"><?php bp_the_profile_field_name(); ?></td>

    And replace it with my code.

    Thread Starter ultimateuser

    (@ultimateuser)

    Thats worked great, thanks a lot!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Date of birth field in Members Profile’ is closed to new replies.