use this function put in function.php file for cat=22 filter change your cat id for you mind
function my_search_form( $form ) {
$form = '<form role="search" method="get" id="searchform" action="' . home_url( "https://wordpress.stackexchange.com/" ) . '" >
<div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
<input type="text" value="' . get_search_query() . '" name="s" id="s" />
<input type="text" value="22" name="cat" id="scat" />
<input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
</div>
</form>';
return $form;
}
add_filter( 'get_search_form', 'my_search_form' );
Related Posts:
- Include custom taxonomy term in search
- Advanced search form with filters for custom taxonomies and custom fields
- How to replicate some of Drupal Views functionality in WordPress?
- 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
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- Custom search for custom post type, custom meta and search fields
- Is there An Input Checkbox Option That Works like `wp_dropdown_categories()` To Use In A WP Search Form?
- How to search from specific post type with tags?
- Include different loop templates in search query
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- CPT Search Form with Taxonomy filter & Or
- Keyword search limited to specific post type filtered by multiple custom taxonomies?
- How to create an advanced filter search?
- Search Custom Post Type & Taxonomies
- search also in taxonomy, tags and custom fields
- WordPress sort search results by custom order
- Pretty URL for custom search for custom post type
- Auto Complete Search
- Advanced search form with filters for custom taxonomies
- dropdowboxes with pre-selected custom fields optios that filters the results according seach needs
- Include custom taxonomy term in search
- how to get this tax_query working?
- Custom Taxonomy Search result page
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- Custom Search | check multiple meta_value for search value
- Hide custom post type from search based on custom taxonomy
- Ideas on how to organize a project [closed]
- Multi Parameter search with custom post type category and tag
- How to Implement Search Functionality?
- How to have multiple search result pages in wordpress with taxonomy terms listed
- WordPress CPT Taxonomy Dashboard Search – How to include taxonomy in search?
- Live search by custom tag
- Custom search for a custom post type in WordPress
- Extensive search filtering and results->PDF in the front-end
- Advanced search form with filters for custom taxonomies and custom fields
- Archive custom template from search
- Custom Field Search
- Getting custom taxonomy from custom post type
- What should I use – Taxonomies, custom fields, Post Type?
- Custom Comment Types
- Not Able to Insert Taxonomy Term Using wp_insert_post()
- Pages, Custom Posts & Custom Taxonomy defining slug structure
- How to rewrite custom post type URL for multiple depths instead of one specific depth
- How to show a tag archive of one post type only
- Custom Search | Wrong output & question
- Custom Taxonomy archive returns 404
- Custom edit post column – category not showing
- Search tags in CPTs
- WP 3.1 getting tax_query to work in query_posts()
- Custom Taxonomy Not Showing Up on Post Page
- Custom permalink – append taxonomy name and term name at the end of permalink
- Limit users by custom taxonomy and user roles
- WordPress Custom Post types and Taxonomy relationships best practices
- Custom Taxonomy Creates Unwanted Integer Terms on Post Save
- Display custom post type taxonomies as an archive page
- Custom Taxonomy Not Showing in Menu
- how to add extra meta box or textarea into custom post types
- Prevent custom taxonomy from being added to admin menu?
- Podcast Guest List
- WordPress Genesis custom taxonomy archive shows 3 repeats of each post
- Custom taxonomy in URL showing 404
- Deleting Custom Taxonomy Term only increments tag_ID
- getting all values of a custom taxonomy if there is no post
- Listing tags from a custom post type
- How to duplicate entire custom post type
- How Can I Change the Custom Post Type Slug to the Taxonomy Slug in the URL?
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- Custom post type permalink tag 404
- How to get list of taxonomy slugs ordered parents>childs?
- Custom post type / taxonomy rewrite archive page 2 gives 404
- WordPress custom taxonomy template not working
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- Removing numerous Meta boxes from numerous CPTs
- How to rewrite the post slug of a custom post type post
- Getting List of child terms from custom taxonomy parent
- How can I get 3 different taxonomy type terms in a div class element?
- Get terms for a specfic post from multiple taxonomies in custom post type
- Is it possible to have hierarchical taxonomy and hierarchical custom post types in one permalink?
- How to get post count of specific taxonomy that have store name & category
- posts_per_page is not working by term
- Filter Custom Post Type Posts by Taxonomy
- How to display only child category post in related posts in custom post type?
- % encoded URL giving 404 error in WordPress
- CPT: multiple loops with different terms
- Specific template for subcategory of custom taxomy
- Advanced search form with multiple custom fields
- Automatically add CPT UI categories to the menu
- Group based routing and administration
- Adding Custom Taxonomy Along-with Post Name in Post Type Permalink
- Get posts of an specific term of a custom taxonomy
- I have a custom taxonomy assigned to two post types. How do I create URLs for different term archives for each post type?
- Conditional posts in WP_query for search
- Add a meta to custom post type which corresponds to a particular taxonomy
- Get custom taxonomy name from custom post
- Custom taxonomy archive is visible to only subscibed users
- custom post type and taxonomies in a php class
- Adding 2 CPT with multiple custom taxonomies to permalinks
- custom taxonomies are not showing up in get_taxonomies
- Taxonomy listing issue – does not display how I would like