Logo
Logo

Search Results Template

The Search Results template controls how the search results page looks on your site. These results are displayed when a user interacts with a Search Form or uses search functionalities on your site.

Creating the Search Results Template

You can create a Search Results template in Breakdance with the following steps:

  1. Go to Breakdance > Templates in the WP-Admin area.
  2. Click on Add Template.
  3. Select the Search Results option.

Designing the Search Results Template

When designing the Search Results template, we recommend using a Post List element set to use the default query. This can be done with the following steps:

  1. Hover over the Search Results template and select Edit in Breakdance.
  2. Add a Post List element to the template.
  3. Save Breakdance.

Now, when you search for content on the front end, you’ll see the Post List element displays the results.

Tips and Tricks

Add Breakdance Content to Search Results

If you want to add Breakdance Content to Search results, you can use your preferred Search plugin and set it to look for the _breakdance_data custom field. The following tutorial covers working with Search plugins.

Customize the Search Query

If you want to use a customized query instead of the default query for a Loop element, you can use the get_search_query function and the s parameter from wp_query to filter results.

An example of this may be found in our Array Query documentation.