cat
accepts category IDs, not slugs or names. a better method here is to use the pre_get_posts
action, the Codex page has an example that does exactly what you’re trying to do.
Related Posts:
- Exclude Tags from get_the_tags
- is there a quick way to hide category from everywhere?
- Exclude category from category archive
- Multiple arrays in post__not_in parameter
- Exclude some categories from the post page
- Don’t execute function on specific posts
- using pre_get_posts to exclude
- problems exluding categories
- Better way to exclude category output for post/pages?
- Disable the link on certain pages
- post__in and tag__not_in conflict
- How to exclude one category
- How to exclude a category in the following Code?
- Exclude Categories from wp_list_categories()
- List post wit the same category but exclude parent
- Display 1 category only with get_the_category (by ID or slug)
- Get first category only and excluding one
- Dynamically exclude menu items from wp_nav_menu
- How do I exclude plugins from getting automatically updated?
- Exclude Current Post from Recent Posts Loop
- Exclude categories from Loop, queries, widgets, post navigation
- Exclude ALL posts from sub categories
- Retrieving custom taxonomy in order, but excluding specific tax IDs
- How to exclude/filter a tag from get_the_tag_list()
- Exclude post_type from admin comments_list
- Exclude a category from the filed under list only on some templates
- Get attached media only
- Filter keywords from search query
- Exclude a specific tag from the get_the_tags list
- Exclude One Category and its Subcategories using WP_LIST_FILTER
- Exclude the parent custom post-type posts only
- Exclude subfolder from WP-redirect works with html but not php files
- How to exclude shortcode from specific page IDs if it’s set to global
- Query Ignoring ‘exclude’ Parameter?
- Filter Posts by Excluding Categories
- How do I exclude posts by custom field value?
- Exclude specific taxonomy term when using wp_get_post_terms
- Exclude custom taxonomy tag from loop
- How to exclude posts from a category when using this particular format
- WP_Query Excluding pages with Order is 0
- pre_get_posts : ‘post__not_in’ doesn’t work with global variable
- how to get posts ids inside pre_get_posts filter?
- Query Posts Exclude Entire Category
- Exclude featured image and custom field from this get_attachment query
- WordPress category widget only show categories with children
- Individual post. Meta_key, taxonomy or post status for separation?
- Excluding pages in WP_query using ACF
- Exclude Category filter from Portfolio section
- Exclude the first ‘n’ number of posts of a tag from home page?
- Exclude image titles from search results
- Exclude all sticky posts front page twenty twelve
- Excluding posts not working
- link to a random custom post while excluding current post
- wp_list_pages() exclude category
- Include posts from some categories while excluding from others
- How to exclude a specific tag from the list of tags for the current post?
- Text with special class as excerpt (or exclude special class)
- Weird string offset errors when displaying post attachments
- Exclude taxonomy term from all loops, but having it on widget
- How do I remove a category from a wordpress loop>
- Exclude Custom post type from /blog page
- How to exclude posts that already appear in the main loop, from the category loop
- Sort populated GravityForms list alphabetically [closed]
- Exclude Specific Tag On Homepage
- Exclude Category ID in function
- How to list all tags except the current tag in tag.php
- Woocommerce filter function not updating
- How can I exclude a specific ID from this line of code?
- How to get post with slug and exclude categories
- Exclude latest post from WP_Query taxonomy term loop
- Exclude posts with certain meta data from search results
- How exclude 3 latest posts of a category in query_posts
- Use posts_where to exclude posts ids from wp_query
- Have posts that belong to multiple categories, exclude some categories from homepage
- Exclude category from get_the_category
- specific post is not excluded from the loop
- How can I exclude a category from the main loop with the category name & not ID?
- User level categories
- Exclude category from drop down list form
- Exclude Woocommerce Product Category From Sitemap
- excluding posts by an ACF field in pagination
- How to get an array of pages ID by some page’s slug and all its children pages in get_posts() function?
- How to remove an item from a custom Walker_Nav_Menu
- How can I exclude a particular category from my WordPress Page 1 and Page 2?
- Exclude category from WP_Query args not working
- Displaying Category in sidebar post widget but not in the loop on home
- List child pages, exclude the current page
- Exclude category from DB query
- Exclude from wp_list_pages by template
- Exclude Tags by Array
- Exclude Author by ID
- Customize category query in widget
- Cannot exclude particular post from loop of custom post type
- Paginate wp_query while utilizing post__not_in
- Excluding cateory not working on my site. how to solve this? [closed]
- WP Query Obj: Set value to be unequal | Hide media by admin
- hide particular category post from front page only [closed]
- WP Recommended Table Exclusions?
- Exclude pages by custom field (with yes/no) storing wrong data?
- Show all tags but exclude a certain tag