Seach page output

Hello,

I’m surprised I can’t find anything on this. How can I have the search results page show a lists of posts and custom post type results. Right now it just shows a bunch of text on a page. I don’t see a way to configure this.

I added my CPT to the search results with this:

function ns_include_resources_in_search($query) {
  if (!is_admin() && $query->is_search && $query->is_main_query()) {
    $query->set('post_type', ['post', 'page', 'resources']);
  }
}
add_action('pre_get_posts', 'ns_include_resources_in_search');

Any help much appreciated!

Hello Jesse,

Thanks for writing in! Are you using the Pro theme with the Blank or Starter stack? You may need to create a custom Archive Layout that will serve as your Search Results page. Please check out this documentation first:

Or check out the tutorials here:

Hope this helps.