Skip Navigation

[Resolved] Setting Up Taxonomies and custom fields correctly

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

Problem:

Setup custom search form with Toolset Blocks plugin.

Solution:

You can follow our documents to setup the search form and sortby filters.

Relevant Documentation:

https://toolset.com/course-lesson/creating-a-custom-search/

https://toolset.com/documentation/user-guides/views/allowing-visitors-to-sort-the-front-end-results/

This support ticket is created 4 years, 11 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/Hong_Kong (GMT+08:00)

Author
Posts
#1668855

Tell us what you are trying to do?

I am building a site for my travel agency.

#1 Destinations - everything searched by ; region>country>state/province>city (I have created "places" category with hierarchy)
- Each destination will have it's own page with the following sections; (1) Country Overview (2) When To Go (3) Special Offers/Suggested Trips (4) Links to posts for things related to that country and destinations/attractions within it (5) Links to places to stay and local support people

Accommodations
Festivals & Events
Local Guides & Drivers
Destinations/Attractions within county - City, National Parks, Museums, etc
Trips/Special Offers - will be based on our travel partners offers/trips and our own internal trips

** All of our content will refer to our Travel DNA which is basically a taxonomy that breaks things down into AFFINITY (surfing, photography, architecture, history), BUDGET and many TYPES (luxury, jungle, beach, safari, homestay, escorted travel, solo travel, etc).

** At this time, any "listings" accommodations, trips, guides, etc are not being paid, however, this is something we eventually want to add when there is plentiful content

** I want Places To Stay, Guides and Attractions to be searchable on the map

Is there any documentation that you are following?

Toolset - too many different posts with differing methods, I am getting confused and before I go too far in I want to make sure I am making this as easy as possible to search and not get too crazy as I have no idea what I am doing and am learning as I go.

Is there a similar example that we can see?

My questions;

1. For my "places" - Is it better to have the taxonomy I have started; region>country>state/province>city OR am I better off having custom fields for each of these with an added field of latitude/longitude for our "explore" page or do I need both?

2. I do not really want to get into WooCommerce unless there is a really good reason to do that, am I missing some benefit if I create everything in Toolset?

3. For our Travel DNA - I was planning to make that a category w/hierarchy that can be checked off when posting a listing or place. Is that the correct way to go about that?

4. For the "When To Go" section, this will break down the average climate for a selection of cities and also a month to month guide of our recommendations. I will want to add a search function that if the user wants to travel in January and wants to go to the beach and take photos; the function will return a list of suggestions. What is the best path here?

Finally, relationships... my concern is setting all of this up to easily relate everything for the searches. So far, I have created the following custom post types; (1) Destinations - 1 country page linking to posts containing everything related (2) Accommodations (3) Events

I was thinking to add more post types - "Trips" or should I use Events & create taxonomies? When To Go - see the website link, I like how this functions?

** I am using Elementor and Astra theme

Sorry for this long request. I have started over several times and am getting the hang of it but, want to stop starting over now :). Also, can this be a private thread?

#1669385

Hello,

Q1) For my "places" ...

I assume you are going to setup multiple select dropdowns as below demo site:
hidden link
section "Search Houses", select dropdowns: State and City
It is based on two post type relationships:
- One-to-many relationship between post types "State" and "City"
- One-to-many relationship between post types "City" and "Property"
Same as above you can setup multiple post types:
region>country>state/province>city>Destinations
Then you will be able to setup such kind of search form by follow our document:
https://toolset.com/course-lesson/creating-a-custom-search/

And there isn't such kind of built-in feature to setup those dropdowns by one taxonomy.

Q2) I do not really want to get into WooCommerce unless there is a really good reason to do that, am I missing some benefit if I create everything in Toolset?
It depends on yourself, Woocommerce plugin is for charging payment, if you need it, please check our tutorial:
https://toolset.com/learn/create-an-ecommerce-wordpress-site/
In summary, you can use Toolset plugins + Woocmmerce plugin to:
- design the shop page/single product page
https://toolset.com/documentation/user-guides/views/getting-started-woocommerce-views/
- charge the payment when your user create new post/user
https://toolset.com/course-lesson/charge-users-for-submitting-content/

Q3) For our Travel DNA...
I agree with you, with taxonomy, you will be able to manage(delete/add) terms easily in the future

Q4) For the "When To Go" section ...
You can create a new post type "Suggestion", setup one-to-many relationship between post type "Destinations" and "Suggestion", in each single "Destinations" post, display a view:
- Query "Suggestion" posts
- Filter by post type relationship between "Destinations" and "Suggestion",
- And setup custom search form for user to search related "Suggestion" posts
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items

Q5) Finally, relationships
It is also depends on yourself, you need to setup post type relationships, you can follow our document to setup the post type relationships:
https://toolset.com/documentation/post-relationships/
There are three post type relationship within Toolset Types plugin:
- One-to-one
- One-to-many
- Many-to-many

There isn't any option to set this thread as private, so I can not change it to private, I can only edit your post.

#1669421

#1 - No, I was not planning to have loads of dropdowns. With nearly 200 countries and countless regions and cities on top of the hundreds of hotels that would get a bit crazy. I would prefer that people could just type in a search "Cambodia" or "Guilin" and a page and posts as well a trips, etc would be reflected. Also they can navigate from menu. I would like to end up with an explore page like this one - hidden link . I bought that theme and scrapped using it because there were far too many limitations for what I need with respect to design and they need far to many workarounds and it gets convoluted for me as I am a novice. Is there a better way?

A search like this hidden link is all I planned. How do I achieve that??? Please just remove all of the links.

#1669489
search-inputs.JPG
tags-field.JPG

Thanks for the details, I have checked the URL you mentioned above:
hidden link

There are 6 fields in the search form:
1) What are you looking for?
This is possible with post content/title search input box, see screenshot search-inputs.JPG
https://toolset.com/course-lesson/creating-a-custom-search/

2) All Category:
You can setup a custom taxonomy, and display the taxonomy as select dropdown in search form

3) Where to look?
This is possible with distance filter, and it need a custom address field, see our document:
https://toolset.com/documentation/user-guides/maps/display-on-google-maps/filtering-and-ordering-map-markers-by-distance/

4) Region
Same as 2)

5) Tags
Same as 2), you can display this field as checkboxes, see screenshot tags-field.JPG

6) Order by:
You can follow our document to setup sort by field:
https://toolset.com/documentation/user-guides/views/allowing-visitors-to-sort-the-front-end-results/
section "Add front-end sorting to a View"

But above fields outputted from Toolset view block won't be able to display exactly same as your demo, you will need to setup custom CSS codes to style them

#1669509

One more question. In my original post I referred to hidden link . Did you have a chance to look at the way their Destination pages are set up? This is the closest thing I can find to what to am trying to accomplish. Are the strategies here going to work and function in this manner?

#1669527
hierarchical-cpt.JPG

I assume we are talking about the single "Destinations" post, for example:
hidden link

There are some sub pages in it, for example:
hidden link
hidden link
...

Is this what you want to achieve?
If it is, this is possible with a hierarchical custom post type, for example, you can create a custom post type "Destinations", in section "Options", enable "hierarchical", see screenshot: hierarchical-cpt.JPG
Then you will be able to get a custom post type just like WP built-in pages.

According to our support policy, we prefer one ticket one question, you can create new tickets for each new questions.
https://toolset.com/toolset-support-policy/

#1669539

Okay, great. I have already done that. Thank you so much! Hope you are staying safe in HK!

#1672133

Hi,

Thanks for the update and glad that Luo's messages helped.

He'll be on vacation this week, so he won't be able to follow up here.

But, you're welcome to mark this ticket as resolved and start a new one for each new question or concern.

regards,
Waqar

#1672801

My issue is resolved now. Thank you!