If your search results page is defaulting to the index.php
it’s because you don’t have a search.php
template in your theme. Quite likely, your index.php
template is also handling search results when items are found, too.
search.php
template, if it exists should be used for search results whether or not any items were found. Just create one and put what you want to in it. See the bottom of the template hierarchy diagram
Related Posts:
- How to disable generation of default image sizes for some custom post types?
- Development of a WordPress Search Plugin – Best Practices
- Mini-Site Strategy
- How To Remove These Stuffs From Custom Post Type List Screen?
- Exclude a category from WP_Query
- How do I Filter Custom Post Type by Custom Taxonomy in the newest WordPress RESTful API?
- Setting up custom post type archives in WP3.1? Any luck?
- show tags of custom post type ONLY
- Hierachical Custom post types permalinks not working
- WordPress custom taxonomy URL rewrite on spelling errors
- TV Show database – Best way for structuring it?
- Defining a default page for custom post type
- Query posts by custom post type and custom taxonomy
- Get post info inside modal window?
- Custom Post Type single and archive pages are not working
- Add Taxonomy Values Within a Custom Post Type RSS Feed
- is_singular just won’t work [closed]
- Query in a Hierarchical Custom Post Type for Children vs Siblings
- removing custom tax & CPT slug, adding taxonomy term in front of custom type
- WordPress post count not showing for custom post type author
- Can I make WordPress use a custom template for a child page
- Why is WordPress custom post type not showing in admin panel?
- Issue with pre_get_posts on custom post type archive pages
- remove permalink “front part” for custom post type
- How to show cutom post labels in options?
- Display custom fields on post excerpt or teaser
- Sorting Custom Post Type by Meta Value but wont display when set to 0
- How to Mass Delete Images from Media Library
- Getting a PHP Notice when using Pods with WPML [closed]
- Can I list a custom post type within another custom post type in the admin area?
- Extending AZIndex plugin to use custom post types and custom taxonomies
- wordpress wp_list_pages help
- How to display custom taxonomies with links in filter menu?
- Rows with custom columns not well formatted after Quick Edit save
- Permit users with author role to edit a custom post type
- Show child custom post types list inside single parent custom post type
- Hide or disallow default custom post type url?
- Create Connection Between two post types
- Best structure / rewrite rules to achieve the following url
- WordPress Custom Search by post_type
- Custom post type Permalinks with hierarchical Taxonomies
- I don’t understand why use array inside the add action hook to create custom post type using object oriented way
- Enable taxonomies by post type in an array of CPTs
- Programatically inserted posts not showing in Posts Table
- Can’t use pagination with custom taxonomy
- Hide specific taxonomies from a taxonomy list using ‘get_object_taxonomies’
- How does the ‘the_post_navigation()’ work for CPT’s?
- Display post from a date range from custom field
- Custom post type paging 404 error
- Targeting categories in custom fields
- Stores category posts in an array
- How to export custom post type with ACF to individual file with automation?
- Custom pages missing on “front page” setting
- Add post type pages with plugin
- Use post in multiple places on a page with multiple posts
- List all Custom Post Type posts excluding certain Taxnomy term
- Changing custom post type URL issue
- unapprove comments on custom post type
- Can’t pull posts of a Custom Post Type based on the custom taxonomy of the CPT
- Conditional Statements
- I need help in designing a custom post type
- Get newest created custom category (get_term_by and variables) (outside Loop)
- Custom Taxonomy Taxonomies of Same Name point to first created URL
- Custom post type pagination error
- Taxonomy terms with the same name are updated between separate custom post types
- Custom taxonomy permalink without term, redirection to CPT slug
- Menu for taxonomies and posts belongs to taxonomy
- Display post count for a specific month
- How do I troubleshoot pre_get_posts with Debug Bar?
- WP_query has incorrect wp_posts.post_name = ‘asc’ when I have custom post type called ‘order’
- when looping through custom post data not appearing
- How to only get the content of post page while looping?
- How to add badge “new” to the post title which are showed in recent post widgets in wordpress
- edit.php all post not working
- Delete Custom Posts & Attachments
- Parent child relation between Post and Page
- How to save post title before publish?
- WooThemes – Vendors / Bookings – Allow Vendors to manage resources
- hierarchical Custom post type child permalink not found
- Add other all taxonomies as meta boxes to custom post type
- URL with Hierarchical Taxonomies and same slug for all terms and sub-terms
- Custom post type archive page not showing on archive-posttype.php
- Implement post status update as frontend news announcement
- WP Query with multiple post types ordered by custom meta date then published date
- Expandable WordPress content (text) inside a post
- Display Custom taxonomy, Child terms and posts in a template Under Specific Parent terms
- Custom Post Types and rewrite rules – One CPT works and a cloned one doesn’t
- Sort a custom post type loop by a custom taxomomy instead of chronologically
- how to override menu widget?
- Add custom taxonomies as class names to an archive page of custom post types
- WordPress URL Problems and Layout
- Querying meta values within an array
- Show posts of parent in edit.php
- How to add custom column to Custom post page list?
- Rewriting hierarchical post type
- Changing to different post type maintains the redirection?
- Sortable admin columns ordering from custom fields isn’t combine com search and Dropdown filter
- Calling custom taxonomies
- Is it possible to use a post name in a custom post slug?
- How do I add the “orange counter” next to a Custom Post Type?