How to create a Custom Search with TukuToi Search and Filters Plugin
In this document we describe how to add a (Full Page Reload) Custom Search to your website, listing Posts that can be filtered by Categories, Tags, Authors and a Free Text Search.
The results will be laid out in a Bootstrap Card Deck, and the search will be using both HTML Native Multiple Select DropDowns as well as Select2 DropDowns.
We will also add a Search and Reset button as well as pagination.
To get started, add a Template under the ClassicPress Dashboard > Templates and name it for example “Full page search”.
Go straight ahead to build this search/list with ShortCodes and HTML.
We have put a small example below to get you started. After you’re done, you can insert this Template using the ShortCode tkt_scs_template (there is a copy-this in the right sidebar of the Template editor that allows you to copy the ShortCode) into any page or post, or even into another TukuToi Template.
Note, you can also add this code or build this search and list directly in a page, but it is not suggested, because if any user below the Administrator Role would be editing said page, all special contents (HTML) would be removed, due to ClassicPress’s and TukuToi Search and Filters / TukuToi Templates security measures.
Thus, it is best to add this code into a Template, and then insert the ShortCode into a Page to render said template, or assign the template to a certain content type or replace the content of a content type with it.