You’ll want to add some radio buttons inside your search form. Then add a filter to your search:
function filter_search( $query ) {
if( $query->is_search ) {
if ( isset($_GET['tag']) )
// alter your search query here.
}
return $query;
}
add_filter( 'pre_get_posts' , 'filter_search' );
Influenced by http://wordpress.org/support/topic/how-to-add-search-filter-by-custom-values#post-1463329
Related Posts:
- How to search for categories and/or tags?
- Sticky posts on home page, search, tag and archives without plugin
- Is it possible to disable certain user roles from creating tags?
- Root level category, tag, author and archive pages to work
- Help with multiple dropdown tags search
- Search Posts / Pages with multiple options?
- Site search needs to find posts for category topic AND Tag or keyword thats not in the post
- Show Posts via cat+cat in URL that are in both Categories doesn’t work
- Automatically adding tags and categories into Post Excerpt for searching
- Return all Tags and Categories in Separate List
- Search by tag, category and author without plugin
- 404 error when i try to search by category or by tag
- Query posts that have all the specified tags
- Is There a Difference Between Taxonomies and Categories?
- What is the difference between a “tag” and a “category”?
- Can’t custom taxonomies have same terms (slugs) as categories?
- How to display non-hierarchical taxonomy as terms with checkboxes?
- WordPress Multiple Category Search
- How do the ‘tag’ and ‘category’ (default) taxonomies do ‘save_post’ action?
- Control term order on a per-post basis
- get all tags from category
- 404 Error On Category and Tags Pages
- Checklist of selected categories
- Exclude categories from search query
- Rewrite URL with category and tag combined using WP_Rewrite
- How to tax query X number of posts related by tag first, then by category if not enough in tag-related
- Use tag interface for hierarchical taxonomy?
- Sort posts by tags in category pages
- Using URL parameters, list posts from category and custom taxonomy
- How to get the url to tag & category base set by the user?
- Filter categories using tags
- Create product category and keyword search form in woocommerce? [closed]
- Are Categories, Tags and Custom Taxonomies any different in regards to SEO?
- Category and tag with same name
- Create subdomains for tags and categories
- In the tag archive – display count of posts for each category they belong to
- Automated adding of one tag to all the posts in a category
- How to set up sub-categories for author pages?
- Moving Categories submenu to Media, but still opens Posts menu
- How to make a relationship between books and authors?
- Exclude most recent posts from specific category in wp_query()
- When using get_categories or similar, is it possible to filter results that contain certain Tags as well?
- Custom Query to search through categories
- How to totally get rid of Category in my blog?
- How to have a static category/author page?
- Showing all the posts in one page?
- Automatically assign posts by author to a specific category
- How to show empty category in admin menus search
- Categories and Tags returning 404 on the sidebar when using ugly permalinks
- How to select product category while adding new product in woocommerce? [closed]
- Deleting All tags except categories Wp database
- How do I get the total number of categories in a list of search results?
- Is it possible to put tags and category information in the post as text?
- Script to duplicate categories as tags
- Category Search functionality on category metabox (wordpress admin)
- Filtering search results
- Remove Categories and Tags from Admin Dashboard
- How to group the loop posts in a particular by author?
- How to control template resolution if both Author and Category filter in place?
- How to filter archives both by category and tag?
- Remove Archive Headline and Archive Intro Text fields on category and tag archive pages in WordPress Admin with Genesis framework
- display most popular tags of category?
- Get tags specific category
- Can paginate_links() be customized for a specific category or tag?
- Any way to assign Post Categories and Tags to Links?
- Category archive page – loop through posts of certain tag (with pagination) – pre_get_posts
- Category vs Tag vs Table
- Custom WP_Query for current category (in category.php)?
- Hide tag and category boxes from the post editor
- Retrieve all posts within tag OR category?
- How to find the number of Tags a post has?
- How to not treat categories as tags in feeds
- Categories: A Greenhorn Question on Strategy (Not Code)
- How to customize tag and category post listings to show introductory content?
- How to show author name only if the post is in a specific category?
- Multiple Category Search
- Are Category or Tag Archive Pages Possible?
- get_the_category and echo out link to child-most/deepest category
- Warning: sizeof (): Parameter must be an array or an object that implements Countable, On products pages
- How can I duplicate categories and tags?
- How to run select query of post with category and tags for API?
- I need to create a search form that will display search results from specific category
- Making a tourism information website [closed]
- Random post + categories + tags
- How get permalink for the current category or tag?
- Display tags from specific category in select fields
- Offline WordPress Application
- Changing permalink from /postname/ to category/postname/
- Find out which user created a category or tag?
- RSS/XML of all Categories and/or Tags
- How to query post like normal search would do. within search.php page
- Get Tags specific to Category using WooCommerce plugin
- Display posts separated by Category in Author’s page
- How to make 2 tag feeds show up on 1 page?
- WordPress search only showing a few posts
- Different templates for different category tags
- Search in custom post type AND in pages with category
- Pagination is not working properly in Product Category/Tag pages
- Get link which associated with a specific category and tag
- Select posts by name and category per REST API