*****Tell us what you are trying to do?*****
I am recreating a site that provides stats and written details on all LAKES in the world. I understand how to create a custom post type and custom fields for 'Lakes' with all the stats and content I want to display for each lake post, but I am having trouble understanding the best way to categorize each lake for a geographic directory like this -- I will need to be able to display lists and sort by certain custom field values for all lakes by (1) Country (2) Regions of country (3) State (4) Regions of State
e.g. - I will have a post for 'Richland Lake' in Texas and it will need to also be accessed within a List View or Archive page for 'USA Lakes' > 'Southwest Region Lakes' > 'Texas Lakes' > 'Prairies Region'
*****Is there any documentation that you are following?*****
I'm trying to follow examples of both Real Estate sites and Directory sites, but not understanding this crucial element of organization.
*****Is there a similar example that we can see?*****
hidden link is the site I am recreating.
Here's an example of an individual lake page: hidden link
Hi,
Welcome to Toolset support and I'd be happy to assist.
Based on what you've shared, here is how I would organize these 'Lakes':
With your custom post type 'Lakes', you can add these 4 new custom taxonomies:
( ref: https://toolset.com/lesson-placement/lesson-placements-1620889-1620059/ )
(1) Countries
(2) Country Regions
(3) States
(4) State Regions
As the name indicates, you'll add the relevant terms into these taxonomies. Although these terms in one taxonomy won't have any direct connection with the terms in the other, you'll be fine as long as the correct terms from each of these taxonomies are attached to the lakes.
This way you'll be able to search lakes by any of these taxonomies and each term will also have its own taxonomy archive page.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Thank you for your reply Waqar! I think I understand... While thinking through this, here's another question I have.
(Note: I'm changing up my taxonomy names for this example because I think I may need to rename them to avoid confusion.)
Let's say I have set up these taxonomies for the USA lakes:
(1) Country
----(2) Region
--------(3) State / Area
------------(4) District
---------------- Individual Lake Goes Here
But other countries are not large enough to be broken down that far, so they only utilize 2-3 of the taxonomies I created:
(1) Country
----(2) Region
--------- Individual Lake Goes Here
So in other words, not all the geographic taxonomies I set up would apply to each lake.
---- Will that pose a problem for eventually creating custom search queries, Views or other site info?
---- Would I create a value of 'NONE' as a term for the taxonomies that don't apply to a lake in a small country like that?
---- Or will giving terms only to the taxonomies that apply work? Essentially just skipping it and leaving that blank for that lake.
I hope I am making sense. Thanks so much for your help.
Jennifer
Thanks for writing back and glad that my message helped.
For data consistency, it is important that no level of geographical taxonomy is left blank or skipped for any lake.
Suppose you have a country 'ABC' where the 'State / Area' geographical level doesn't apply. For that country, you can add a single term 'All States of ABC', for the 'State / Area' taxonomy.
Similarly, suppose for another country 'XYZ', the 'District' geographical level doesn't apply. For that country, you can add a single term 'All Districts of XYZ', for that 'District' taxonomy.
Note: If you'll use a single 'None' term for the levels which do not apply, it will be difficult to differentiate between them, based on the geographical hierarchy.