Skip Navigation

[Resolved] I need toolset in many to many relationship based search

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.

This thread is resolved. Here is a description of the problem and solution.

Problem:

I am making a directory website. It is a directory of lawyers to be sorted by locations and practice areas. On one page will be shown list of locations and list of practice areas. I want that when a visitor selects a location (say New York) out of hundreds of locations, he should be taken to a page having list of practice areas. When he clicks on a practice area (say criminal defense), he should be taken to "search results" page where criminal defense lawyers in New York should appear.
Similarly, if visitor first selects criminal defense practice area out of list of practice areas, he should be taken to list of locations. When he selects a location (New York), he should again get the same result as above.
In other words 2x3=6 and 3x2=6. Search results remain the same.

Solution:

There isn't the exact feature within Views plugin, here is my suggestions:

1) setup the a custom post type "lawyers", with custom taxonomy "practice areas" + custom add address field "locations"
https://toolset.com/documentation/user-guides/display-on-google-maps/#map-address-fields

2) create a view listing "lawyers" posts, setup the custom search form, filter with:
a) custom taxonomy "practice areas"
b) address field "locations"
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/#filtering-markers-by-distance

Relevant Documentation:

https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by simranjeetS-2 6 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#614910

Tell us what you are trying to do?
I am making a directory website. It is a directory of lawyers to be sorted by locations and practice areas. On one page will be shown list of locations and list of practice areas. I want that when a visitor selects a location (say New York) out of hundreds of locations, he should be taken to a page having list of practice areas. When he clicks on a practice area (say criminal defense), he should be taken to "search results" page where criminal defense lawyers in New York should appear.
Similarly, if visitor first selects criminal defense practice area out of list of practice areas, he should be taken to list of locations. When he selects a location (New York), he should again get the same result as above.
In other words 2x3=6 and 3x2=6. Search results remain the same.

Is there any documentation that you are following?
I tried implementing many to many relationships but failed. I could get lawyers from cities or lawyers from practice areas, but not both and in manner mentioned above.

Is there a similar example that we can see?
lawyers.com
hg.com
martindale.com

What is the link to your site?
reviews.legal
hidden link
hidden link
(developmental)
password to see is
s9876616815

#615090

Hi,

There isn't the exact feature within Views plugin, here is my suggestions:

1) setup the a custom post type "lawyers", with custom taxonomy "practice areas" + custom add address field "locations"
https://toolset.com/documentation/user-guides/display-on-google-maps/#map-address-fields

2) create a view listing "lawyers" posts, setup the custom search form, filter with:
a) custom taxonomy "practice areas"
b) address field "locations"
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/#filtering-markers-by-distance

#619916

Thanks. I have done what you suggested

The forum ‘Types Community Support’ is closed to new topics and replies.