Custom Searches now Power Archives in Toolset Reference Sites


November 9, 2016

Custom search is one of the most powerful and popular features in Toolset. We just finished an update to all reference sites to use custom search directly on custom post archives. This update demonstrates how important custom post archives are and what you can do with them.

Search for different kinds of properties in the real estate reference

Custom search for houses
Custom search for houses

The real estate reference site includes a different custom post type for every kind of property. This is important, so each property type can have its own custom fields, editing screen and front-end display. It’s also important for potential buyers. Normally people look for a specific type of property and not just “real estate”.

Now, the houses archive includes a custom search. The custom search allows to find houses according to state and city (hierarchical parents), price, number of bedrooms and additional features.

The result appears at both a grid and on a Google Map.

Why the archive page is so important?

You can also implement a custom search on a regular WordPress page. Putting the search on the custom post archive is especially important because this is the place visitors will reach if your site’s navigation is correct.

Here is a ‘single house’:

The URL of a "single house"
The URL of a “single house”

The normal URLs for custom post types are:

The normal breadcrumbs will be:

Home » CPT_archive » item

So, visitors can reach the CPT archive in two ways:

  • Click on it in the breadcrumbs
  • Remove the ‘tail’ of the URL

It’s best to use this archive page as the index. If you need a custom search, best to put it there (like we’re doing now in Toolset reference sites).

How to create a custom search for a CPT archive

The steps to set up a custom search on an archive are:

  1. Enable custom search for the archive, either when you create it or later in “screen options”
  2. Choose the behaviour of the custom search (update the results when clicking on search, auto-update, full-page / AJAX update, etc)
  3. Add inputs to the search and design the search form with HTML
  4. Add fields to the output and design the results using HTML

The full steps are covered in the custom search documentation.

Toolset reference sites with custom searches in archives

Toolset reference sites are fully-working designs, which you can use both to learn Toolset and as a starting point for your client sites.

You will find a custom search in custom post type archives in these sites:

Site What’s in the custom search

Real estate reference
Real estate reference
Different kinds of properties

WooCommerce shop
WooCommerce shop
WooCommerce products

Classifieds ads

How to use Toolset reference sites

The easiest way to use Toolset reference sites is in our Discover WP system. Choose the reference site that you want to experiment with and create a free account. There’s nothing to install or set up.

You can use these reference sites as a basis for your client projects. For that, follow the instructions for installing reference sites locally.

Questions? Suggestions? Ideas?

Leave your comments and we’ll get back to you.