A simple search in codex shows there are some parameters you can set to exclude some categories for example :
<?php $args = array(
'show_option_all' => '',
'show_option_none' => '',
'orderby' => 'ID',
'order' => 'ASC',
'show_count' => 0,
'hide_empty' => 1,
'child_of' => 0,
'exclude' => '',
'echo' => 1,
'selected' => 0,
'hierarchical' => 0,
'name' => 'cat',
'id' => '',
'class' => 'postform',
'depth' => 0,
'tab_index' => 0,
'taxonomy' => 'category',
'hide_if_empty' => false
); ?>
Related Posts:
- Custom search page and url in multilanguage
- Searching on my blog is not working
- Insert DIV container below 1st search result
- I’ve messed up the admin search functionality. Help!
- 404 error when i try to search by category or by tag
- Search Results Customization
- Make related posts display first in search result
- A search box for all sites – Multisite
- WP search in metadata post
- meta field search too restrictive in pre_get_post() for custom search
- How to stop the search results from loading the wrong template?
- How to search for categories instead of products in Woocommerce?
- Search.php Modification Needed
- Search results show only content by admin post authors
- Buddypress Activity search with OR query instead of AND
- search form display no result
- Search taxonomy terms, not posts
- Extend search function with link to searched word
- Content instead Excerpt on term
- “Modular/reusable” content and search results
- WordPress search not able to find text in url
- Make the title and […] clickable in result search
- How to exclude one post format from search result?
- Help with WordPress search
- Add Search Form to Dropdown menu
- Search & Replace trailing strings
- I want to edit the search function
- Returning the entire line of a custom search result filter
- Search multiple custom post types with tags
- Custom search results page not showing excerpt
- Custom Search Form WP_Meta_Query – Filtering Custom Fields
- Search doesn’t work with ‘relation’ => ‘OR’
- Search in particular category in wordpress
- Page/Post path in Search Results
- Search for Author and Custom Post Type
- search does not yield access restricted results
- Several loop in search result
- Add meta tag to search results
- If searched in a category show different 404 page
- Customizing Home Page with Pagelines Platform
- Search Limited to Categories Not Working
- Search not displaying results
- Google Search and Own Website Search?
- How we filter the search base on post-meta tags
- How to display articles based on composed tag
- Selectbox and Searchform and Custom Search Page
- Hightlight search-terms with functions does remove or disable other filters?
- Make search result returned only from tags! [duplicate]
- wp_redirect and search engine bots
- Search functionality with multiple categories
- Relevanssi show only 1 result
- Search page isn’t returning any results
- SQL: Search query to get attachments only of those parents which are published
- Strip the + symbol from the_search_query
- Error when searching without any results
- Listing parent section in search results
- Form Data Causes “Page Not Found”
- Search results: How to add direct jump to anchor?
- Change the text “search result for” on search result page
- Search query with quotes
- Search redirects to index
- WordPress search form and input type=”image”
- Query posts that have all the specified tags
- I need a custom search page to lead to search.php but it goes to index.php
- Putting Text in the Search Box. eg- “Search My Site” [closed]
- Search options/filters
- How To Change Url Doing Some Changes in Search Form
- how can I make the search return only single random correct result?
- Search Results with googlemaps
- Display category tree of a post in search results
- How to search pdf attachment?
- Want to creat a search for my wordpress theme [closed]
- Website Search Results Not Showing Images
- How to remove search bar from the blog post
- Return 404 for /search/ queries – For Genesis
- Deprecating WordPress URL from Google, promoting custom domain [closed]
- Search and replace titles of posts with specific tags
- How do I turn this form into a search form? [closed]
- Adding search box for admin on custom admin page
- How to search for articles containing two words?
- Wp eCommerce meta information search [closed]
- Search with multiple selects that include tags
- Limit search to posts and pages
- Different search results with WordPress and Relevanssi
- How do I find a shortcode stored in wordpress?
- Search results from a specific database table
- Return excerpt on Search
- Adding attributes to the core search block form
- How make Autocomplete with wp_query in post_type attachment
- Attached file how can i work the wp_query to search for related names
- Exclude category in search results in functions.php
- Wp admin: I need search meta key from table wp_usermeta in screen custom post type
- How do I create a search form that searches only within a custom post type?
- search videos on divi builder
- Two Querys in one Search – Category-Tag nightmare – HOW?
- Remove “All categories” from searchbar dropdown
- Custom WordPress Excerpt within terms
- Making ACF fields appear in search results
- Search results truncated
- How to make wordpress Dynamic Search-icon from Predesigned Static Html Search-icon?