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

  • Author
  • #168513
     kandeshop
    Participant

    We have edited the Profile header using the cover-image-header to show specific data using <?php echo xprofile_get_field_data(‘25’); ?> when we show the age field it shows the date of birth, please could you tell me what <?php echo command I’d need to use to display the members age.

    #168591
     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 🙂

    #168722
     Radu
    Moderator

    Hi,

    Just add those functions : https://pastebin.com/raw/TCJPGBxU to wp-content/themes/sweetdate-child/functions.php then use the next function to display directly the user age

    If the name of date selector it’s Birthday by default use the next function

    COPY CODE
    
    <?php echo display_user_age(); ?>
    

    If the name of date selector has another name replace the BirthdayFieldName with the name of that field.

    COPY CODE
    
    <?php echo display_user_age('BirthdayFieldName'); ?>
    

    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 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?