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:
- How to create a custom search for custom post type?
- Extending the search context in the admin list post screen
- Include custom taxonomy term in search
- Advanced search form with filters for custom taxonomies and custom fields
- Custom Post Type Archives by Year & Month?
- Get custom post type slug for an archive page
- Creating a search form for custom fields
- Searching multiple custom post types and pages
- Custom post type pagination 404 fix?
- Adding content to archive and taxonomy pages on custom post types?
- AJAX search on post pages by custom post type
- How can I change the admin search posts fields?
- How to make a WP_Query search with custom post types?
- Filtering a custom post type by custom taxonomy in archive template
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- get term archive url / link
- How to get the custom post type from an archive page?
- group search results by post type?
- Site loads very slow for archive custom post type page
- 404 error Custom search results page for custom post types with friendly URL
- Keep same archive.php for post from archive?
- Stop Custom post type from being searched via URL
- archive.php can’t find categorized posts
- pre_get_posts not firing at all
- multiple custom post type category selection search
- Custom Search Template for Custom Post Types
- archive-{custom_post_type}.php not getting recognized wordpress
- Archive.php is not displaying tags
- Custom Search not working
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Search page for custom post type
- Custom post type category page not working
- Custom post type blog pagination conflict
- Is it good practice to search for custom posts based on custom field values?
- Diffrent search templates for different post types
- Custom post types with date based archive
- Custom Post Types Archives and daily/monthly joke
- paging is not working properly on news archives page [duplicate]
- Cannot get query var ‘post_type’ to work
- How can I set up the URL for a category archive for a custom post type?
- ‘Blog Archive’ suddenly appeared on custom post type; how to remove
- Categories in custom post types
- Is it possible to remove the word “date” from archives?
- Multiple search template with separate stylesheets
- Display results from two Custom Post Types in page template
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Advanced search form with filters for custom taxonomies and custom fields
- Generate daily archive whenever any post type is added
- Problem with custom post type search
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- Stop header code from showing in category page?
- is_singular won’t call my functions?
- Query Custom Post Type and sort by year
- Custom post types not using archive structure
- Archive custom template from search
- Searching for a single custom post type, buddypress
- How to turn custom-post archive into an overview page, listing the metadata of the posts?
- admin search of pages returns custom post types
- Customising wordpress search and using $_GET[“s”]
- How do I do this?: If custom post type exists, echo it, else do not
- WordPress search results
- search this custom post type
- Why does ‘exclude_from_search’ exclude a custom post type from WP_Query?
- Pagination not working for archive
- how to pass args for archive.php query?
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Remove plugin’s custom post type archive page and single pages [closed]
- Drop Down Filter with CPT as Options for Search Form
- Searching Custom Posts content with JQuery
- Custom Field Search
- WordPress search results grouped by post type
- Custom post archive with search, is_search() is false?
- Why custom search engine only searches in post titles of custom posts?
- How do I provide a search form for a specific post type, that is capable of searching within custom fields of the specified CPT?
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- Show custom category archive as front page and remove taxonomy slug from urls
- Group search results by post type, but having a unique heading for each section?
- Meta_query question
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- How to exclude html tags and class on search
- Custom Post Type posts not getting picked up in archive widgets
- Multiple search forms and respective results page templates?
- Remove date rewrite rule for custom post type archive page
- Fix Custom Post Type not appearing in search results?
- Why using archive pages at all?
- Taxonomy term archive claims there are no posts, but there are. How to resolve?
- Search and filter terms of a custom post type only and display results
- Get a custom post type’s taxonomy type term names displayed as checkboxes and filter
- A theme has 3 default types posts, services and portfolio in its posts grid.I want to add my custom post type products How can I achieve that?
- Separate archive template to show posts and CPT by same category/taxonomy
- Create an archive page by combining two post type
- How to Display Content from Search URLs on Permanent URLs in WordPress?
- author archives, showing all custom post types, problem on pagination
- Exclude multiple custom post types from search
- How do I get an intermediary page between 2 custom post types?
- Search for portfolio tags & mixing portfoliotags and post tags
- WordPress Custom Post Type Archive, filter by category and get pagination working
- How can I retain get_post_type() in between consecutive searches after a search returns no results?
- How do I create a custom search function to only show contact information if they search for an exact unique identifier?
- Custom Taxonomy archive with url parameters