Documentation

Hey there, it looks like you've been redirected from designsandcode.com - as you can see we have a new home - read more

As a Post Type Archive

To display your results using existing post type archives (and their layouts/templates) use this setting.

Configure Settings

  1. To display your Search results, and search within a specific post type Archive set the Display Method to Post Type Archive (found in the Display Results tab)
  2. Ensure that under the General tab, that you have selected only one Post Type for your search form – this will be the archive that is used.
  3. If creating your own Custom Post Type, also ensure that your Post Type has `has_archive` enabled.

Taxonomy Archives

To allow the same Search Form to work on your taxonomy archives, ensure the settings Enable on Taxonomy Archives is ticked.  This allows you to use the same search form for your custom post type, across the custom post types taxonomies too.

Caveats

The same potential issues that apply to the regular Archive display method apply here.

Search & Filter uses the main query to hook into and modify, so the templates by your theme for post type archives must also use this.  Any custom queries are not considered main queries by WordPress and should be removed from the template.

To overcome this you could try the suggestions in the FAQs.