Isn’t this easily to be achieved by checking if ?s= is set ?
You do have to output the results of this search on the same page, by using the post archive link as action url.
if ( isset( $_GET[s] ) {
// show posts
}
Related Posts:
- Custom post type pagination 404 fix?
- How to make a WP_Query search with custom post types?
- Filtering a custom post type by custom taxonomy in archive template
- get term archive url / link
- How to get the custom post type from an archive page?
- WordPress post sorting with AJAX
- Proper way of making custom post type landing page or archive page
- Why have my custom post type searches stopped working after changing URLs / updating WordPress?
- Search that will look in custom field, post title and post content
- Returning search results by relevance, including Custom Post Types
- Display Editable Text Above CPT Archive Listings
- Custom Post Type Archives with 0 Posts Redirects as 404
- How to replicate some of Drupal Views functionality in WordPress?
- Archive page with multiple taxonomies rewrite
- Archive page…limiting posts per page
- Seperating Custom Post Search Results
- WP 3.1 – archive pages for custom content types possible now without a plugin?
- Exclude from search all custom posts which are NOT in a taxonomy term
- Exclude a term of a taxonomy with a custom post type in a search
- Date archives for custom post type
- Custom comment status possible?
- Custom Post Types: pretty search URLs and has_archive
- paginate function in archive for custom-post-type
- Call different archive page based on post type
- No results searching custom post type in admin panel
- How to create archive page for taxonomy terms within custom post type
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Category and post tag archives do not include posts from custom post type
- error in Advanced Search Form for Custom Post Types in WordPress array_key_exists() expects parameter 2to be array, string given
- Search Custom Post Type Custom Fields
- Custom Post Type not appearing in website search
- Display CPT description on archive.php pages for all CPT
- Custom search for custom post meta with pre_get_posts interferes with WP search
- WooCommerce product search titles only
- I did group my search results by post type, but how can i give each of them its own order?
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- Custom Post Type Archive Page Filtering
- How to modify archive query with pre_get_posts to append CPTs?
- custom post type Search returns No Results in admin panel
- Search Custom Post Type & Taxonomies
- URL of a custom post type’s post format archive?
- filter custom post type by meta key in dashboard
- Change CPT archive title
- WordPress sort search results by custom order
- The loop seems stuck to a single (now deleted) post
- Use “archive” as slug for custom post type
- Is it better to use filter for the_content in archive pages?
- how to remove pages loading with the archive templates
- WordPress search and date filter not working with custom post type
- Custom filter for main search: how to exclude specific post_type from search results
- Assign CPT archive page attributes
- Display an icon based on post type
- how to get this tax_query working?
- How to group search results by post type and only if post type result is not empty?
- find custom post type post by searching its custom field with my string
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- Display Date & Author Info on Custom Post Type Archive Page
- What is the correct term for a tool that filters content based on metadata?
- How to constrain the results to a specific post_type on tag archive page?
- Ideas on how to organize a project [closed]
- How can I relate custom post types?
- CPT, meta-data, url parameter
- Search CPT Title AND Meta
- How to prevent a custom post type from using the archive.php template?
- Event Archive by Month
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- How to achieve a multi-taxomony layout with posts?
- Change search query in wordpress custom post type
- Create a post automatically if search result has zero results
- Custom Post type page content (archive page)
- Set up Custom Taxonomy Archive Template File To Cover 3 Categories
- Group custom post type posts by month
- Search only one custom post type
- Creating an archive page or simple template to list all values of a custom field of specific post type listing
- Custom post types not showing on the standard WordPress Category page
- Tell wordpress to show a single page instead of an archive page
- Turning archive templates to a page template maintaining the slug
- How can i remove post type archive URL?
- I can not display search template created from a post type custom
- Creating a search results page from a custom post type in a plugin?
- Search custom post type result in same template page
- Include images from pages in wp search.php results in default wp search
- Search facility with directories
- Create Second Search Page Only for Custom Post Type
- Custom taxonomy archive slug overwrites static page
- custom search results – order results differently by post type
- Post search not looking at post title since 4.4.2 upgrade
- Rewriting archive page slug to be different than custom post type slug
- Site loads very slow for archive custom post type page
- Custom Search not working
- Is it good practice to search for custom posts based on custom field values?
- Cannot get query var ‘post_type’ to work
- Is it possible to remove the word “date” from archives?
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Generate daily archive whenever any post type is added
- Why does ‘exclude_from_search’ exclude a custom post type from WP_Query?
- Custom post archive with search, is_search() is false?
- Custom Post Type posts not getting picked up in archive widgets
- How do I get an intermediary page between 2 custom post types?