Skip Navigation

[Resolved] I want to have 2 "ancestors" post types

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#1979253

Tell us what you are trying to do?
I want to be able to set up a search function (similar to the one currently used in the 'Real Estate Reference Site') that will allow me to select a state and then either a city or a county.

So I could select the state of 'North Carolina' (from the State dropdown) and then select either a 'North Carolina' 'City' (from the City dropdown) or a 'North Carolina' 'County' (from the County dropdown).

I attempted to set things up on this page:
hidden link

But it has me select a County first. I want to be able to select the State first.

Is there any documentation that you are following?
I don't see documentation that explains how to do this.

Is there a similar example that we can see?
I looked through all the Toolset Reference Sites and do not see an example of what I am trying to do.

What is the link to your site?
hidden link

#1979269

Hi,

Thank you for contacting us and I'd be happy to assist.

Looking at the search filters from the example page, it seems that the post relationships are currently setup like this:

Counties -> States -> Cities -> Properties
One County can have many States and one State can have many Cities and one City can have many Properties.

To achieve what you're planning, the post relationships should be set like this:

States -> Counties -> Cities -> Properties
One State can have many Counties and one County can have many Cities and one City can have many Properties.

After this change, you'll be able to add a search where a visitor will select a State first, then a County, and then a City.

It is important to note that the way the relationship search filter works, you can create a linear select option in one direction ( i.e. States -> Counties -> Cities ), but not in two directions ( such as States -> Counties or States -> Cities ) within the same search form.

If you'd prefer to allow the visitors to either search by a County or City, then you'll need to create two separate views with their own separate search forms.

The relationship structure, in that case, would be:

States -> Counties -> Properties
One State can have many Counties and one County can have many Properties.

States -> Cities -> Properties
One State can have many Cities and one City can have many Properties.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1980391

My issue is resolved now. Thank you!