Here’s an option.
Give a more specific name e.g. custom_search_form
to your submit button:
(...)
//First a submit button
$output .= '<input type="submit" class="submit" name="custom_search_form" id="searchsubmit" value="submit" />'."\r\n";
Then you can add this to your functions.php file:
add_action( 'parse_request', 'my_custom_search_form' );
function my_custom_search_form($query) {
//return if it not our custom search form
if ( ! isset( $query->query_vars[ 'custom_search_form' ] ) )
return $query;
//handle form here
}
Also, don’t forget to set the query_var to true when registering your taxonomy:
'query_var' => true,
Related Posts:
- Use an HTML Element To Filter Taxonomies In WP Search
- Using pre_get_posts to rewrite search query to display posts from multiple taxonomies
- Exclude Specific Term from Search
- WordPress database error: [Not unique table/alias: ‘wp_postmeta’]
- Hide the term description on the term edit page, for a given taxonomy
- WordPress Search – display taxonomy terms in results
- Modify Term Update Redirection
- Front End Post Save Child terms
- How to find taxonomy name using only taxonomy TERM ID (or taxonomy term name)
- Sort posts by number of matched terms
- How to add custom taxonomy to search
- Taxonomy.php issue with search and filters
- Extending wordpress search to include excerpts and taxonomies?
- How to filter WordPress search, excluding post in some custom taxonomies?
- how to search in custom fields & custom taxonomy for custom search
- Search by type posts and taxonomy
- Recreating the hierarchy of taxonomies for a dropdown form menu?
- How can I add buttons to a custom column in the taxonomy table?
- get_terms adds slaces to the resualt
- How to implement custom search with input fields?
- How can I populate a select element with terms from a custom taxonomy and filter post results?
- How do I keep the page I’m on within the URL when running a search on a taxonomy?
- Add multiple taxonomy filters to edit.php that support search
- Extend & Search Native WordPress Image Galleries With Tags and Taxonomies?
- Simple Filter between multiple taxonomys
- Custom Taxonomy Not Working When added to WordPress Search
- Search Tool only refreshes Page without showing results
- WordPress thinks my custom taxonomy pages are search pages #seo
- Select multiple categories from CPT to display in LayersWP builder widget
- Removing “s” from search with custom parameters
- Passing form inputs into multi-taxonomy query
- Custom URLs in Custom Search Results
- Search Query for Multiple Terms In Same Taxonomy
- Why isn’t the ‘no results’ being shown when a query returns no results?
- Changing input type from text to multi select dropdown – skill taxonomy
- Clean Custom URL for Serach + Custom Taxonomy
- Advanced search redirecting to another page then filter further
- Search only custom taxonomies
- How do I make multiple dependent input fields that use the jquery autocomplete function?
- WordPress autocomplete search with taxonomies
- Geographic search with taxonomy structure [duplicate]
- Custom Taxonomy Not Saving in Front End Post
- search using multiple taxonomies and keyword
- Taxonomy or Custom Field
- Multiple Drop-Down custom taxonomies search
- Filter with two id of the same value CPT UI(taxanomies)
- Amend taxonomy to search in wordpress admin
- Include get_term_link inside search
- Product custom taxonomy is not found when space in name
- Rewrite Search URL Permalink For CPT Custom Taxonomies
- Search custom taxonomy via query-string?
- How to add a dynamic dropdown derived from custom taxonomy
- How to exclude woocommerece product category in search results?
- WordPress Multiple Taxonomy Query
- WordPress custom taxonomies new/edit post autocomplete
- Post not showing in my custom advanced search
- Include attachments with a custom taxonomy in search
- Custom taxonomy displayed in search results
- How to perform a search inside a specific taxonomy category
- get multiple values from $_GET from multiple checkboxes
- Calling Custom Taxonomy Dropdown in Form
- Custom Taxonomy, shows empty value (home page of website)
- Advanced WordPress search form based on custom taxonomy and custom meta value
- Custom Search only for my Custom Taxonomy Page – data
- Search and filter with custom field in taxonomy
- Taxonomy to display form after creation
- Best approach of implementing multi-select/checkboxes for taxonomies?
- Change order of Custom Taxonomy List
- How To Change Custom Taxonomy To Radio Buttons
- Custom Taxonomy terms with latest post ordered by date pagination issue
- get_terms of post->id
- WordPress renames slug of tags used in multiple taxonomies?
- How to get a list of taxonomy terms which are being used only within certain post types?
- List Custom Taxonomy Based on Post Count & Category
- Custom taxonomies as product variations
- Echo specific term in an array
- Print terms with taxonomy and metabox value
- Create and set templates for custom taxonomies
- What is faster: custom taxonomy or serialized post-meta for db retrieval? (over 60,000 posts)
- What does ‘category__in’ mean in queries?
- Why doesnt this query work? (Custom Taxonomy)
- Display Posts by Custom Taxonomy Chosen Terms
- How do I get term data associated with the current post, where the result is not wrapped in HTML?
- How to have multiple instances of the same taxonomy in a search form
- Taxonomy archive template not working
- Dropdown list of taxonomies won’t display selected
- Set two terms for a post when they differ only by an accent
- Unknown column ‘wp_posts.ID’ in ‘field list
- Custom taxonomies registered via plugin stop existing after function finishes running
- Echo ACF taxonomy field within a foreach for another taxonomy
- How can I rewrite the URL of my custom taxonomy to include the year?
- Problem registering custom taxonomy
- Permalinks incorrectly inserting multiple categories
- Where to put code to get custom taxonomy term id?
- Get one custom taxonomy category
- Select default taxonomy on dropdown
- Creating a page for custom taxonomy archive
- How can I query for all values of a custom taxonomies?
- Returning info from MYSQL table via custom taxonomy
- Gravity Forms with Advanced Post Creation Add-On not updating ACF fields on custom taxonomy