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.

Country, city list for search.

This topic is resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Maks Rusakovič
    Participant
    • 29 Topics
    • 104 Posts
    @wegosi

    The main function of country/city combination should be implemented.

    BP xProfile Location is not working, because user can use different languages, for examples.

    Ajax country/field will be great.

    It could be great to connect country/city list from Facebook, for example. or https://vk.com/dev/database.getCities

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

    Hi @wegosi,

    Thank you for your feedback! ?

    Gwangi is providing default XProfile fields for the City and the Country. For instance, their values are displayed on the cards shown on the members directory page. But those could be easily replaced by other values.

    When you write that BP XProfile is not working, do you mean that the plugin isn’t fully integrated with Gwangi? And do you wish to display the field value on member cards and profiles?

    Thank you for your reply.

    Best,

    Maks Rusakovič
    Participant
    • 29 Topics
    • 104 Posts
    @wegosi

    Hello @themosaurus

    I mean, BP xProfile Location is not working.
    It’s just fill the country/city field.
    But if the user uses different city names in different languages – search is not working.

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

    Hi @wegosi,

    We’ve been looking for a solution to the issue with BP xProfile Location. This will be fixed in a coming release.
    In the meantime, if you wish to use this plugin and display the value for your Location field instead of City and Country field values, please read the following topic:

    bug? missing location text on member profile card and header

    In summary, you can display the BP xProfile Location field value by adding the following code snippet to your website:

    if ( ! function_exists( 'gwangi_buddypress_member_location' ) ) :
        /**
         * Print the HTML for the BP xProfile Location field.
         *
         * @since 1.0.0
         */
        function gwangi_buddypress_member_location() {
            if ( function_exists( 'xprofile_get_field_data' ) ) :
                $location     = xprofile_get_field_data( 'Location', bp_get_member_user_id() );
                $allowed_html = array(
                    'a' => array(
                        'href' => array(),
                        'rel'  => array(),
                    ),
                );
                if ( ! empty( $location ) ) : ?>
                    <div class="bp-member-xprofile-custom-field bp-member-location"><?php echo wp_kses( $location, $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

    We hope this will solve your issue. ?

    All the best,

    Maks Rusakovič
    Participant
    • 29 Topics
    • 104 Posts
    @wegosi

    Hello @themosaurus

    Thank you. Yes, I use custom field name. Now, it’s working.
    How to add AGE info before location? Because I also use other plugin for birthdate.

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

    Hi @wegosi,

    It is necessary to proceed in the same way as for the location field:

    if ( ! function_exists( 'gwangi_buddypress_member_birthdate' ) ) :
        /**
         * Print the HTML for the BP xProfile Age textfield.
         *
         * @since 1.0.0
         */
        function gwangi_buddypress_member_birthdate() {
            if ( function_exists( 'xprofile_get_field_data' ) ) :
                $custom_field = xprofile_get_field_data( 'Age', bp_get_member_user_id() );
                $allowed_html = array(
                    'a' => array(
                        'href' => array(),
                        'rel'  => array(),
                    ),
                );
                if ( ! empty( $custom_field ) ) : ?>
                    <div class="bp-member-xprofile-custom-field bp-member-age"><?php echo wp_kses( $custom_field, $allowed_html ); ?></div>
                    <?php
                endif;
            endif;
        }
    endif;

    Where “Age” is your field name (in your case “Узрост”).
    We have taken the lead and the code snippet have already been added to your site.

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

The topic ‘Country, city list for search.’ 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