// Above the loop on your search result template:
if ( is_search() ) // Are we on a search result page?
{
global $wp_query, $query_string;
// now modify/filter the query (result)
query_posts( $query_string . 'cat=1&tag=apples+apples' );
}
Related Posts:
- Sticky posts on home page, search, tag and archives without plugin
- Search by word, category, tag, author
- 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
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Control term order on a per-post basis
- 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
- Using URL parameters, list posts from category and custom taxonomy
- Filter categories using tags
- Are Categories, Tags and Custom Taxonomies any different in regards to SEO?
- Create subdomains for tags and categories
- Moving Categories submenu to Media, but still opens Posts menu
- How to totally get rid of Category in my blog?
- Showing all the posts in one page?
- 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]
- 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
- display most popular tags of category?
- Can paginate_links() be customized for a specific category or tag?
- Any way to assign Post Categories and Tags to Links?
- 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
- Random post + categories + tags
- 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
- Select posts by name and category per REST API
- Needing a snippet for listing category specific tags
- How to display categories which contains particular tag?
- “Categories” for six authors [closed]
- How to list categories within tags?
- How to “group” (categorize) the Pages together?
- Is There a Difference Between Taxonomies and Categories?
- Use Tag input metabox style for Categories
- Refine/Filter the Search Results by Category
- Custom SQL Query: Get all posts with category id and a concated list of tags on each post
- Show matching categories in search page
- Have multiple category queries from the URL been fixed yet?
- Keyword search in multiple categories
- Related Tags not in category
- scaleability of tags
- Get URL Category Name By ID
- How do I add a tag slug to a category URL to filter posts?
- Show the amount of posts in a tag in a specific category has
- Display all product tags associated with a specific product category
- How replace individual elements in the RSS feed with a single string
- Adding a H1 Tag to Post Tags automatically, but hide the tag? (Same for Category)
- Conditional category & tag statement
- Include either name or slug in the include parameter using wp_list_categories?
- List all posts of certain category which share some tags
- Search form options group categories
- How can I filter posts by tag on the fly
- Retrieve post tags from from main wp_query
- Advanced permalinks structure
- How can I include custom category and tag base in template files?
- Custom menu with categories and tags
- How to filter tags by category?
- Count how many posts have a specified tag AND category
- How to prevent tag “iframe” from being deleted from the heading description of rubric?
- echo $category[0]-> cat_name; shows only one category name
- When creating category, it creates automatically tag, or, when creating tag, it creates automatically category in same name
- Using heirarchial tags or Custom taxonomies
- show only one category and filter by tag
- Balance Tags to the_content Words Length
- Category and tag urls return 404 error
- How to echo Tags and Categories as plain text
- Categories and Tags Conflict after Woocommerce Installation
- Split posts into 2 separate streams
- How to exclude category and post_tag taxonomy while displaying custom taxonomy?
- Make related posts display first in search result
- How to remove specific categories from tag archives?
- Page Type with Category Link
- A simple question regarding tags and categories
- Display related posts with same category or same tag return blank
- How can I allow people to ‘subscribe’ to categories?
- How to add an empty entry to masonry?
- Own Custom Tags/Category page ( posts)
- Loops in category description
- Several loop in search result
- How to create a category or tag available exclusively to the admins and not to the users?
- Tracking multiple tags or categories
- How to load jquery tag-it plugin into admin?
- Modify functions.php to add a term ‘uses-theme’ set to theme name on post save
- List products from current category
- Moving Blog and Changing URL
- Remove “All categories” from searchbar dropdown