Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

Show subtitles on members directory

This topic is resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Bradie
    Participant
    • 4 Topics
    • 10 Posts
    @bradieb

    Show subtitles on members directory

    I saw a previous post saying y default, if you want the age, city and country displayed on the members cards, your profile fields need to be named exactly like this:
    * Birthdate
    * City
    * Country

    And that you would provide the code snippet for those that want to change the name of these fields and still display them.

    Can you please provide the code snippet for the specific fields:

    * What is it?
    * URL
    * Short Description

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi @bradieb,

    Thank you for your precious feedback.

    There is definitely a missing feature in our theme which will be fixed in the next update. You’ll be able to dynamically pick and choose the extended profile fields to display on member cards and profiles.

    So, if you’re not in too much of a hurry, we’ll fixed this for you. Otherwise, we can provide a short snippet.

    Cheers,

    Bradie
    Participant
    • 4 Topics
    • 10 Posts
    @bradieb

    Hi @themosaurus if you could please provide a short snippet for the specific fields:

    * What is it?
    * URL
    * Short Description

    Thanks,

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi @bradieb,

    Please try to add the following code snippet to your website:

    if ( ! function_exists( 'gwangi_buddypress_member_location' ) ) :
        /**
         * Print the HTML for the City and Country XProfile Field in the BP Member Directory.
         *
         * @since 1.0.0
         */
        function gwangi_buddypress_member_location() {
            if ( function_exists( 'xprofile_get_field_data' ) ) :
                $city    = xprofile_get_field_data( 'City',    bp_get_member_user_id() );
                $country = xprofile_get_field_data( 'Country', bp_get_member_user_id() );
    
                // Extra xprofile fields.
                $what = xprofile_get_field_data( 'What is it?',       bp_get_member_user_id() );
                $url  = xprofile_get_field_data( 'URL',               bp_get_member_user_id() );
                $desc = xprofile_get_field_data( 'Short Description', bp_get_member_user_id() );
    
                $allowed_html = array(
                    'a' => array(
                        'href' => array(),
                        'rel'  => array(),
                    ),
                );
                
                if ( ! empty( $city ) && ! empty( $country ) ) : ?>
                    <div class="bp-member-xprofile-custom-field bp-member-location"><?php echo wp_kses( $city, $allowed_html ); ?>, <?php echo wp_kses( $country, $allowed_html ); ?></div>
                <?php
                endif;
    
                if ( ! empty( $what ) ) : ?>
                    <div class="bp-member-xprofile-custom-field bp-member-what"><?php echo wp_kses( $what, $allowed_html ); ?></div>
                <?php
                endif;
    
                if ( ! empty( $url ) ) : ?>
                    <div class="bp-member-xprofile-custom-field bp-member-url"><?php echo wp_kses( $url, $allowed_html ); ?></div>
                <?php
                endif;
    
                if ( ! empty( $desc ) ) : ?>
                    <div class="bp-member-xprofile-custom-field bp-member-desc"><?php echo wp_kses( $desc, $allowed_html ); ?></div>
                <?php
                endif;
            endif;
        }
    endif;

    To add this code snippet to your site, we recommend that you use a the Code Snippets plugin (https://wordpress.org/plugins/code-snippets/). If you have never activated this plugin, please read the following post:

    Adding Custom PHP Without Changing Your Child Theme

    Please also note that we don’t provide any theme customization. So, you shouldn’t expect other snippets from us unless it’s to fix an issue stemming from our own codebase. We always try our best to help theme users whenever we can and only provide code snippets out of courtesy to prevent them from waiting for the next update.

    Regards,

Roboraptor 🦖
Themosaurus Topic Closer

Hi there,

This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!

Best regards,
The Themosaurus team.

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

The topic ‘Show subtitles on members directory’ is closed to new replies.

Troubleshooting Demo Imports

You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.

Happy With our Support So Far?

Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Setup Your Cera or Gwangi powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

To unleash the full power of your Cera or Gwangi theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.

Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.

Holiday, Weather & Festive effects
to pimp your WordPress Site