Skip Navigation

[Resolved] Create a Custom Search with Toolset

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

Problem:
How can we create a Custom Search with Toolset, where we can let people search thru different real estates and eventually location, type of estate, and other data?

Solution:
A rough outline of such a search can be seen described here:
https://toolset.com/forums/topic/i-need-help-creating-a-custom-search/#post-1350783

If you require detailed help with any of the steps or your requirements differ, please open a ticket with our support to receive assistance.

This support ticket is created 5 years, 2 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by angelapiqui 5 years, 2 months ago.

Assisted by: Beda.

Author
Posts
#1350617
engel-volkers-1.jpg
engel-volkers-2.jpg

Hi guys,

I was wondering if it's possible to make a custom search as you can see on the screenshots attached. It's from the site hidden link.

I would like to build something like that, but I have no clue on how to do it. Also I tried to find some documentation that could help me but didn't find any. If possible, is there any documentation? If not, could you recommend an alternative solution. The idea is to filter by "rent" and "buy" (also including advanced search) and that it shows results for all post types (houses/apartments/offices/lands).

Best Regards,

Sintia

#1350783

You can do that with Toolset.
You will require profound HTML and CSS/JS knowledge to style it exactly as you see it there, but the PHP part, SQL Queries and all that's required to feed your HTML with data can be done with Toolset.

1. You can either create many post types or just one, I would use only one post type: Estate. You can however also use many post types, but it is a bit harder on the query times, if you query many post types at once, and the search will not be as easily setup as follows.
https://toolset.com/documentation/user-guides/create-a-custom-post-type/
2. I would then create 2 taxonomies, one being "buy/sell" and the other "House/Flat/Etc", hence, "Contract" and "Type" Custom Taxonomies.
https://toolset.com/documentation/user-guides/create-custom-taxonomies/
3. Then I'd create a few Estate Posts, classify them in "Contract" and "Type" terms
4. After, a View should be created that queries the "Estate" post type. In this View, you can create a so called "Front End Search" using the "Search and pagination" Section in the View, where you can add the Front End inputs for the filters for "Contract" and "Type". You can natively style them with Toolset already but for more in depth styling you'll need to add Custom HTML and CSS/JS additionally to the default outputs
5. Then you complete the View loop, with the details you want to show about the Post Type "Estate" when viewing the Page where you insert the View.
Views is a bit of a learning curve at first, if you never used it imagine it like a interface in WordPress to create not single posts, but LISTS of posts, so many single posts. It's like an archive, or a search result page of WordPress, where you can customize the appearance and search behavior all just pressing buttons. As said, styling is something that often requires a bit more manual work.
For Views, I'd start here:
https://toolset.com/documentation/user-guides/learn-what-you-can-do-with-views/
Then, for your particular task, go further here: https://toolset.com/documentation/user-guides/front-page-filters/ and here https://toolset.com/documentation/user-guides/view-layouts-101/

For general reference, keep this one handy: https://toolset.com/documentation/user-guides/display-lists-of-posts-and-create-custom-searches/, https://toolset.com/documentation/user-guides/.
From there you can get to most important aspects in the Docs.

Please let me know if I forgot some detail or something was not clear.

#1352715

My issue is resolved now. Thank you!