I would suggest that you make the "location" and "job types" as custom taxonomies assigned to the custom post type "Jobs". Check our glossary for a summary of taxonomies and taxonomy terms:
- https://toolset.com/glossary/taxonomy/
- https://toolset.com/glossary/taxonomy-term/
Taxonomies can also be hierarchical. You can for example add terms to the location taxonomy and have a hierarchy of states, cities, and even neighbors.
Your custom post type would be "Jobs", and each job will have terms assigned to it from the taxonomies:
- For location taxonomy: The term would be "Buffalo".
- For the job types taxonomy: The term would be "Tennis" or "Tennis coaching".
On the view, you will query Jobs posts, and add the taxonomies filter to it. The view can be configured to return only the terms that have results on them. For example, if the user chooses "Tennis", the filter will update and offer only the locations that have "Tennis" jobs.
Making locations and job types custom post types is not really suited to the use case that you have described. Unless you are looking to create additional relationships or classifications for the locations and job types. But, I think, that the only type you want to classify is the Jobs post type.
I hope this makes sense. Let me know if you have any questions or you want to add more details about your project.
Finally, I would suggest checking our reference sites and our tutorials, they may answer most of your questions on how to use Toolset. For example:
- Reference sites (Travel destination and Real estate) here https://toolset.com/account/downloads/#application-frameworks
- Tutorials about directory listing and real estate sites https://toolset.com/documentation/
The reason for making Location and Job Type custom post types is to simplify the editing in the future.
The Locations are fixed but more will be added.
The job types can change over time. The tennis coach job is the same for each city which could be up to 100 cities. If an edit is made then there is only one job type to edit not 100.
Let me know if this is not clear.
I still believe that Job Types and Locations should be a taxonomy instead of a post type. Job offers on the other hand should be a post type the uses these taxonomies. In fact, the concept of status(draft, published, trash, etc) is more suited to a job offer than to a job type. For example, once an offer expires you can send it to the trash or change its status to "Draft" so it won't appear on the site.
I created an example in the test site, and you can see the view(built using blocks) in action here hidden link
You can always create the view using the legacy editor if you want.
Log into the test site using this link hidden link
- Custom post type: Job Offers hidden link
- Custom taxonomies: Locations and Job Types hidden link
- Taxonomy terms: "London" and "Paris" for the taxonomy "Locations", "Tennis coach" and "Marketing Expert" for the taxonomy "Job Types"
- View: Created using blocks inside this page hidden link
Remember that custom post types have some features that custom taxonomies do not have, for example:
- Status.
- Comments.
- Created and modified dates.
I hope this helps. Let me know if you have any questions.
Can we keep this ticker open for a few more days. I would like to try an idea based on your feedback.
Of course, we can do that. I'll set the ticket as waiting for your feedback, it should be kept open for 3 weeks, and you will receive email notifications before the automatic closure.
Please note, that the test site will expire 7 days after the latest admin login.