The form has to updated as
<form id="cptsearch" action="<?php echo home_url(); ?>" method="get">
<input type="text" name="s" />
<input type="hidden" name="post_type" value="POSTTYPENAME" />
<input id="searchsubmit" type="submit" alt="Search" value="Search" />
</form>
Related Posts:
- Group search results by post type, but hide post types with no results
- how to get this tax_query working?
- Searching post types
- Search form to find custom meta box generated data
- WordPress search results grouped by post type
- Include custom taxonomy term in search
- How to display value of custom fields in page
- Searching multiple custom post types and pages
- How can I change the admin search posts fields?
- Development of a WordPress Search Plugin – Best Practices
- Mini-Site Strategy
- Admin Area Custom Type Search By Meta Fields Without Title & Content
- Simple way to search custom-post types only
- Custom Post Type Archive URL takes over page URL
- Search everything (posts, pages, tags, cpt, meta)
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- filter search result with custom post type meta key
- Custom search for custom post type, custom meta and search fields
- No results searching custom post type in admin panel
- custom search result page
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Customize Search Results for Custom Post Type
- adding .current* tags to custom post types and taxonomies
- 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
- Page as a child of a Custom Post Type
- ACF simple text field value not showing
- WooCommerce product search titles only
- Search Custom Post Type & Taxonomies
- How to stick custom post at the top in search results
- filter custom post type by meta key in dashboard
- Can I search only some of the fields of a custom post type?
- Help need making decision. Ads rotating site on wordpress
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Display a grid of taxonomy terms at root taxonomy page
- How to have this permalink structure: post_type/postname/custom_inner_page
- custom comments form for custom post type
- Advanced search form with filters for custom taxonomies
- filter search custom field query
- Include custom taxonomy term in search
- Warning: Invalid argument supplied for foreach() [closed]
- Custom post type isn’t working
- Search one custom post type ONLY, disable “all posts”
- Getting Un Wanted Gallery Shortcode In The Page on Loop
- Custom WP_Query doesn’t display all posts
- WordPress app page not found error for posts with hyphen in permalink
- Create a comments template for custom post types
- Show Taxonomies with admin area for custom post type?
- Include custom post type custom taxonomies in Categories widget
- Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?
- Hide custom post type from search based on custom taxonomy
- Pagination on search results page
- Methods for development wordpress themes [closed]
- Best way to create a search for custom post type by custom field values
- Multi Parameter search with custom post type category and tag
- Redirecting search to specific templates with $_GET[“post_type”]
- How does one go about converting custom post type to post format?
- How to display magic field’s custom write panel in wordpress theme?
- Not Able to Add New Class To CPT Attachment Image
- Search custom type post
- How to have multiple search result pages in wordpress with taxonomy terms listed
- How to store the third party script with HTML code in the wordpress custom input field?
- How to display custom field in product description?
- Creating a custom WP query for a Custom Post Type
- Add extra elements to the_post in a custom post_type
- Visualize info in just custom post_type in theme
- cpt not display inside nav menu
- Issue on Getting URL of Uploaded Image to a Custom Post Type
- WP_List_Table Inside Metabox Not Working on Clicking Search Button
- Custom Post Type has wrong label and is not found when called by a loop
- Custom post type single page uses the right template in preview mode but shows a different template after being posted
- Custom Post type doesn’t appear in search results
- search results to show individual ACF fields from inside custom posts
- post_type incorrect for custom post type
- Live search by custom tag
- Custom Post Type archive page listing a 404 or single post
- Too many revision when post status is changes [duplicate]
- how to create custom taxonomy drop downs for parents and child
- Values show up in custom home page but not in custom post pages
- Permanent Custom Post Type
- creating a custom post template
- 2 custom posts types, in their own columns, one pagination for both
- wordpress query_posts with foundation 6 Accordion not working correctly
- Custom post type with custom taxonomy permalinks
- WP_Query with custom post type search showing all results every time
- Extensive search filtering and results->PDF in the front-end
- erase post excerpt limitation [×]
- Having some trouble properly displaying Custom Post Types in templates
- How to Create Custom Post Type with Multiple Color Options?
- Multiple search template with separate stylesheets
- Advanced search form with filters for custom taxonomies and custom fields
- Searching for a single custom post type, buddypress
- How do I do this?: If custom post type exists, echo it, else do not
- WordPress search results
- Drop Down Filter with CPT as Options for Search Form
- Searching Custom Posts content with JQuery
- Retrieve a post with its ACF repeater fields in wordpress
- 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?
- Meta_query question