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.

List of Cities

This topic is resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • prince
    Participant
    • 12 Topics
    • 19 Posts
    @prince22

    Hi there,

    How can add list of all cities so when the user comes for registration their city is listed and user can select it? Is there a plugin or a way you recommend to do this?

    Thanks for your help!

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

    Hi @prince22,

    You can add as many cities as you want in the edition of the “city” field by clicking on the “add another option” link (cf. screenshot).
    Then, these new entries will be in the choices of city field on the register page.

    Hope this will help you.

    Regards,

    prince
    Participant
    • 12 Topics
    • 19 Posts
    @prince22

    Thanks for the quick reply! That is what I have been doing, but that is manual.

    I’m looking for a solution to add all the list of cities across the globe or say 500 cities at once or a quick way to do it. On the demo you have the list of all countries pre populated. Would there be any other way to add cities quickly?

    Thanks again.

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

    Hi @prince22,

    Unfortunately, there’s no plugin that we could think of to do this. The “Country” field has been programmatically filled by Gwangi after you’ve generated you default fields.

    In the event that you wish to programmatically generate you cities for your “City” field, you will need to manually list every city that you wish to add to your site. We’re not sure that it will save you more time than doing it with the BuddyPress admin page.

    For the record, please give a look to the code written to insert the country values.

    if ( $country_list_id ) {
          $countries = apply_filters( 'gwangi_buddypress_admin_countries', array(
                esc_html__( 'Afghanistan', 'gwangi' ),
                esc_html__( 'Albania', 'gwangi' ),
                esc_html__( 'Algeria', 'gwangi' ),
                esc_html__( 'Andorra', 'gwangi' ),
                esc_html__( 'Angola', 'gwangi' ),
                esc_html__( 'Antigua and Barbuda', 'gwangi' ),
                esc_html__( 'Argentina', 'gwangi' ),
                esc_html__( 'Armenia', 'gwangi' ),
                esc_html__( 'Australia', 'gwangi' ),
                esc_html__( 'Austria', 'gwangi' ),
                esc_html__( 'Azerbaijan', 'gwangi' ),
                esc_html__( 'Bahamas', 'gwangi' ),
                esc_html__( 'Bahrain', 'gwangi' ),
                esc_html__( 'Bangladesh', 'gwangi' ),
                esc_html__( 'Barbados', 'gwangi' ),
                esc_html__( 'Belarus', 'gwangi' ),
                esc_html__( 'Belgium', 'gwangi' ),
                esc_html__( 'Belize', 'gwangi' ),
                esc_html__( 'Benin', 'gwangi' ),
                esc_html__( 'Bhutan', 'gwangi' ),
                esc_html__( 'Bolivia', 'gwangi' ),
                esc_html__( 'Bosnia and Herzegovina', 'gwangi' ),
                esc_html__( 'Botswana', 'gwangi' ),
                esc_html__( 'Brazil', 'gwangi' ),
                esc_html__( 'Brunei', 'gwangi' ),
                esc_html__( 'Bulgaria', 'gwangi' ),
                esc_html__( 'Burkina Faso', 'gwangi' ),
                esc_html__( 'Burundi', 'gwangi' ),
                esc_html__( 'Cambodia', 'gwangi' ),
                esc_html__( 'Cameroon', 'gwangi' ),
                esc_html__( 'Canada', 'gwangi' ),
                esc_html__( 'Cape Verde', 'gwangi' ),
                esc_html__( 'Central African Republic', 'gwangi' ),
                esc_html__( 'Chad', 'gwangi' ),
                esc_html__( 'Chile', 'gwangi' ),
                esc_html__( 'China', 'gwangi' ),
                esc_html__( 'Colombi', 'gwangi' ),
                esc_html__( 'Comoros', 'gwangi' ),
                esc_html__( 'Congo (Brazzaville)', 'gwangi' ),
                esc_html__( 'Congo', 'gwangi' ),
                esc_html__( 'Costa Rica', 'gwangi' ),
                esc_html__( 'Cote d\'Ivoire', 'gwangi' ),
                esc_html__( 'Croatia', 'gwangi' ),
                esc_html__( 'Cuba', 'gwangi' ),
                esc_html__( 'Cyprus', 'gwangi' ),
                esc_html__( 'Czech Republic', 'gwangi' ),
                esc_html__( 'Denmark', 'gwangi' ),
                esc_html__( 'Djibouti', 'gwangi' ),
                esc_html__( 'Dominica', 'gwangi' ),
                esc_html__( 'Dominican Republic', 'gwangi' ),
                esc_html__( 'East Timor (Timor Timur)', 'gwangi' ),
                esc_html__( 'Ecuador', 'gwangi' ),
                esc_html__( 'Egypt', 'gwangi' ),
                esc_html__( 'El Salvador', 'gwangi' ),
                esc_html__( 'Equatorial Guinea', 'gwangi' ),
                esc_html__( 'Eritrea', 'gwangi' ),
                esc_html__( 'Estonia', 'gwangi' ),
                esc_html__( 'Ethiopia', 'gwangi' ),
                esc_html__( 'Fiji', 'gwangi' ),
                esc_html__( 'Finland', 'gwangi' ),
                esc_html__( 'France', 'gwangi' ),
                esc_html__( 'Gabon', 'gwangi' ),
                esc_html__( 'Gambia, The', 'gwangi' ),
                esc_html__( 'Georgia', 'gwangi' ),
                esc_html__( 'Germany', 'gwangi' ),
                esc_html__( 'Ghana', 'gwangi' ),
                esc_html__( 'Greece', 'gwangi' ),
                esc_html__( 'Grenada', 'gwangi' ),
                esc_html__( 'Guatemala', 'gwangi' ),
                esc_html__( 'Guinea', 'gwangi' ),
                esc_html__( 'Guinea-Bissau', 'gwangi' ),
                esc_html__( 'Guyana', 'gwangi' ),
                esc_html__( 'Haiti', 'gwangi' ),
                esc_html__( 'Honduras', 'gwangi' ),
                esc_html__( 'Hungary', 'gwangi' ),
                esc_html__( 'Iceland', 'gwangi' ),
                esc_html__( 'India', 'gwangi' ),
                esc_html__( 'Indonesia', 'gwangi' ),
                esc_html__( 'Iran', 'gwangi' ),
                esc_html__( 'Iraq', 'gwangi' ),
                esc_html__( 'Ireland', 'gwangi' ),
                esc_html__( 'Israel', 'gwangi' ),
                esc_html__( 'Italy', 'gwangi' ),
                esc_html__( 'Jamaica', 'gwangi' ),
                esc_html__( 'Japan', 'gwangi' ),
                esc_html__( 'Jordan', 'gwangi' ),
                esc_html__( 'Kazakhstan', 'gwangi' ),
                esc_html__( 'Kenya', 'gwangi' ),
                esc_html__( 'Kiribati', 'gwangi' ),
                esc_html__( 'Korea, North', 'gwangi' ),
                esc_html__( 'Korea, South', 'gwangi' ),
                esc_html__( 'Kuwait', 'gwangi' ),
                esc_html__( 'Kyrgyzstan', 'gwangi' ),
                esc_html__( 'Laos', 'gwangi' ),
                esc_html__( 'Latvia', 'gwangi' ),
                esc_html__( 'Lebanon', 'gwangi' ),
                esc_html__( 'Lesotho', 'gwangi' ),
                esc_html__( 'Liberia', 'gwangi' ),
                esc_html__( 'Libya', 'gwangi' ),
                esc_html__( 'Liechtenstein', 'gwangi' ),
                esc_html__( 'Lithuania', 'gwangi' ),
                esc_html__( 'Luxembourg', 'gwangi' ),
                esc_html__( 'Macedonia', 'gwangi' ),
                esc_html__( 'Madagascar', 'gwangi' ),
                esc_html__( 'Malawi', 'gwangi' ),
                esc_html__( 'Malaysia', 'gwangi' ),
                esc_html__( 'Maldives', 'gwangi' ),
                esc_html__( 'Mali', 'gwangi' ),
                esc_html__( 'Malta', 'gwangi' ),
                esc_html__( 'Marshall Islands', 'gwangi' ),
                esc_html__( 'Mauritania', 'gwangi' ),
                esc_html__( 'Mauritius', 'gwangi' ),
                esc_html__( 'Mexico', 'gwangi' ),
                esc_html__( 'Micronesia', 'gwangi' ),
                esc_html__( 'Moldova', 'gwangi' ),
                esc_html__( 'Monaco', 'gwangi' ),
                esc_html__( 'Mongolia', 'gwangi' ),
                esc_html__( 'Morocco', 'gwangi' ),
                esc_html__( 'Mozambique', 'gwangi' ),
                esc_html__( 'Myanmar', 'gwangi' ),
                esc_html__( 'Namibia', 'gwangi' ),
                esc_html__( 'Nauru', 'gwangi' ),
                esc_html__( 'Nepal', 'gwangi' ),
                esc_html__( 'Netherlands', 'gwangi' ),
                esc_html__( 'New Zealand', 'gwangi' ),
                esc_html__( 'Nicaragua', 'gwangi' ),
                esc_html__( 'Niger', 'gwangi' ),
                esc_html__( 'Nigeria', 'gwangi' ),
                esc_html__( 'Norway', 'gwangi' ),
                esc_html__( 'Oman', 'gwangi' ),
                esc_html__( 'Pakistan', 'gwangi' ),
                esc_html__( 'Palau', 'gwangi' ),
                esc_html__( 'Panama', 'gwangi' ),
                esc_html__( 'Papua New Guinea', 'gwangi' ),
                esc_html__( 'Paraguay', 'gwangi' ),
                esc_html__( 'Peru', 'gwangi' ),
                esc_html__( 'Philippines', 'gwangi' ),
                esc_html__( 'Poland', 'gwangi' ),
                esc_html__( 'Portugal', 'gwangi' ),
                esc_html__( 'Qatar', 'gwangi' ),
                esc_html__( 'Romania', 'gwangi' ),
                esc_html__( 'Russia', 'gwangi' ),
                esc_html__( 'Rwanda', 'gwangi' ),
                esc_html__( 'Saint Kitts and Nevis', 'gwangi' ),
                esc_html__( 'Saint Lucia', 'gwangi' ),
                esc_html__( 'Saint Vincent', 'gwangi' ),
                esc_html__( 'Samoa', 'gwangi' ),
                esc_html__( 'San Marino', 'gwangi' ),
                esc_html__( 'Sao Tome and Principe', 'gwangi' ),
                esc_html__( 'Saudi Arabia', 'gwangi' ),
                esc_html__( 'Senegal', 'gwangi' ),
                esc_html__( 'Serbia and Montenegro', 'gwangi' ),
                esc_html__( 'Seychelles', 'gwangi' ),
                esc_html__( 'Sierra Leone', 'gwangi' ),
                esc_html__( 'Singapore', 'gwangi' ),
                esc_html__( 'Slovakia', 'gwangi' ),
                esc_html__( 'Slovenia', 'gwangi' ),
                esc_html__( 'Solomon Islands', 'gwangi' ),
                esc_html__( 'Somalia', 'gwangi' ),
                esc_html__( 'South Africa', 'gwangi' ),
                esc_html__( 'Spain', 'gwangi' ),
                esc_html__( 'Sri Lanka', 'gwangi' ),
                esc_html__( 'Sudan', 'gwangi' ),
                esc_html__( 'Suriname', 'gwangi' ),
                esc_html__( 'Swaziland', 'gwangi' ),
                esc_html__( 'Sweden', 'gwangi' ),
                esc_html__( 'Switzerland', 'gwangi' ),
                esc_html__( 'Syria', 'gwangi' ),
                esc_html__( 'Taiwan', 'gwangi' ),
                esc_html__( 'Tajikistan', 'gwangi' ),
                esc_html__( 'Tanzania', 'gwangi' ),
                esc_html__( 'Thailand', 'gwangi' ),
                esc_html__( 'Togo', 'gwangi' ),
                esc_html__( 'Tonga', 'gwangi' ),
                esc_html__( 'Trinidad and Tobago', 'gwangi' ),
                esc_html__( 'Tunisia', 'gwangi' ),
                esc_html__( 'Turkey', 'gwangi' ),
                esc_html__( 'Turkmenistan', 'gwangi' ),
                esc_html__( 'Tuvalu', 'gwangi' ),
                esc_html__( 'Uganda', 'gwangi' ),
                esc_html__( 'Ukraine', 'gwangi' ),
                esc_html__( 'United Arab Emirates', 'gwangi' ),
                esc_html__( 'United Kingdom', 'gwangi' ),
                esc_html__( 'United States', 'gwangi' ),
                esc_html__( 'Uruguay', 'gwangi' ),
                esc_html__( 'Uzbekistan', 'gwangi' ),
                esc_html__( 'Vanuatu', 'gwangi' ),
                esc_html__( 'Vatican City', 'gwangi' ),
                esc_html__( 'Venezuela', 'gwangi' ),
                esc_html__( 'Vietnam', 'gwangi' ),
                esc_html__( 'Yemen', 'gwangi' ),
                esc_html__( 'Zambia', 'gwangi' ),
                esc_html__( 'Zimbabwe', 'gwangi' ),
          ) );
    
          foreach ( $countries as $i => $country ) {
                xprofile_insert_field( array(
                      'field_group_id' => 1,
                      'parent_id'      => $country_list_id,
                      'type'           => 'selectbox',
                      'name'           => $country,
                      'option_order'   => $i + 1,
                ) );
          }
    }

    If you wish, we could provide you with the code template to programmatically insert your city values but like mentioned above, you will need to manually add your 500 cities to the list.

    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 ‘List of Cities’ 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