How to add 2 new fileds country and states

i want to add 2 new fileds country and states.
how to do that?
i dont wana use geolocation.

help me in right direction.

Have you read the documentation ?

Hi,

You can add new fields using the Listing Attributes, please see this doc: How to add listing attributes - HivePress Help Center

​I hope this is helpful to you.

thanks for the information. it did not help. i already know that. my question is this??
how can i achieve this in listing page??

When a user selects their “Country” from the 1st drop down menu, then those “States & Provinces” automatically populate in the 2nd drop down menu below called “State/Province:”…

i dont want to use geolocation and i want it to be in our website also it should be searchable. can you point me in a right direction??

very bad support. no one willing to help

Hi,

Sorry for the inconvenience. Please note that our extension has three options to achieve what you need:

  1. Using the Geolocation extension.

  2. Add these fields using the listing attribute. However, note that you will need to add all locations manually.

  3. Add this functionality using custom code.

As the first two options do not suit you, we cannot help with the last option, as custom implementation is beyond our support. I recommend that you review the policy in more detail at this link: Support Policy | HivePress

Nevertheless, you can always consider hiring experts: Customize your website | HivePress

I believe this will be useful to you.

Hello andrii, thanks for your quick response.

i have a news i created a code thats work fine now. i want your tiny help.
here is my code: hivepress plugin >> includes >> fields >> class-country-selector.php · GitHub

it works fine. but the issue is i have put this code in the hivepress plugin.

after update it will be gone.

i tried creating a plugin then put this file in the includes >> fields folder in my plugin.
js files i put them in JS folder.

but then this new attribute never appear.

how can i put it in the new plugin. can you check and point me. thanks

Hi,

You can add custom code using this documentation, then it will not be removed: How to add custom code snippets - HivePress Help Center

Also, you can create your own extension and add the code there: https://docs.hivepress.io/developer-docs/tutorials/create-a-custom-hivepress-extension

​I hope this is helpful to you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

If one adds an attribute for country and city and provinces etc then it helps but issue is how to enter all the data for each city and state.

@madhvendras84 made a post with some code.

could you detail the steps you followed to get the solution with the exhaustive list of cities etc

@madhvendras84 Hope you see this. THanks

How can we populate many cities etc into the database.

hi @madhvendras84 Did you manage to put the 1000s of cities ? it is hard to do this manually. How did you do it ? A solution where it does not get lost on update ?

yes i custom coded and achieved it. Hivepress did not help at all

Please could you share how you achieved it. if you click my profile pic and see it shows my contact info. kindly touchbase.

MadhvendraAs84@gmail.com
WhatsApp +918299483053