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?
- Multiple Custom Taxonomy Rewrite
- WordPress – Form does not filter the results of taxonomies
- Change the term based on the value of a $variable using wp_update_post in submitting a form
- How do I show the parent term on a custom taxonomy template (not the ID)?
- Get taxonomy link with post type slug prefix
- How to Create taxonomy using ‘null’ for $object_type?
- Count tags for current post and save into custom meta field (and update it on post edit)
- how can i add more than one custom taxonomy?
- Editing a Search Form
- Create new Taxonomy, add extra fields, register terms AND extra fields values?
- Custom dropdown list taxonomy not saved
- WordPress not saving tags for custom taxonomy term description
- WordPress taxonomy terms archive template help
- How to Implement Custom Taxonomy Conditional Page?
- How to get all the terms from a custom hierarchical taxonomy via REST api?
- Yoast – Custom Taxonomy – primary category
- wp_insert_post not adding taxonomy (using wp_set_object_terms)
- How to show category list in WordPress
- Adding Advanced Custom Fields to posts
- Filter “get_terms” query
- Rewriting url for multiple Taxonomies and Custom Post Type
- custom taxonomy not showing up after adding capabilities upon updating to WP 5.1.1
- Why is the category item count not updating after assigning a category?
- Add custom taxonomy for post using cron job
- Show message if term slug changed
- Live search by custom tag
- Get post meta value outside of the loop
- use apply_filters return taxonomies custom post type
- List posts with slug title
- how to display custom taxonomy on an archive page?
- Display taxonomies for custom post type
- custom taxonomies menu
- Problem registering custom taxonomy