• Author
  • jon

    Instead of using google maps, use city list as a link. must make the city choose when the ad is inserted.

    it’s possible?



    You can try using a custom selectable attribute instead of Google Maps, add a new attribute in HivePress/Listings/Attributes section (with “Select” type), and add cities manually. Make it required so users will have to select some city from the list. Please note that it’s just an attribute and cities will not be displayed on a map, and it will not define location (although you can add it to the search form).


    how can I add it in the search form? in the search bar instead of google maps



    If this attribute is named city then this code snippet should work:

    	function( $attributes ) {
    		if ( isset( $attributes['city'] ) ) {
    			$attributes['city']['searchable'] = true;
    		return $attributes;

    @jon – can you share the list of cities of the world that you are using ?

    i am looking for a fully comprehensive list of all towns, cities etc of the world – can anyone help ?


    I strongly suggest using an external API (Google Maps) instead, flooding the WordPress database with geodata may significantly slow down your site.

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

You must be logged in to reply to this topic.


Sign In

Don't have an account? Register

Forgot password?


Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.