When using cat in the query you need to specify the category id not name. Try this.
<?php
$gallery = get_cat_id('gallery');
$shirts = get_cat_id('shirts');
$hoodies = get_cat_id('hoodies');
$excluded_cats="-".$gallery.',-'.$shirts.',-'.$hoodies;
$limit = 5;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts( 'cat=".$excluded_cats."&showposts=" . $limit . "&paged=' . $paged );
?>
Related Posts:
- List posts by category exclude current post
- Query Posts Exclude Entire Category
- Get posts from sites in Multisite?
- How To Modify The Loop in archives.php To Have 11 Posts Per Page and CSS Styling
- Exclude the category from the WordPress loop
- Exclude certain category from latest updates
- Exclude categories from Loop, queries, widgets, post navigation
- Using categories & “stickyness” together
- Does the ‘cat’ argument in query_posts fetch posts from subcategories as well as the given ID?
- wp_list_categories exclude not working
- Excluding a category from next and previous post links
- Display only the latest post from multiple categories
- Exclude Category From Home Page, Display Posts on It’s Own Page?
- How to exclude categories from recent posts, recent comments & category widgets?
- Exclude a category from the filed under list only on some templates
- Select category in custom query
- Display one latest post from multiple categories
- Return category slug / title from category ID
- Exclude category from loop not working
- “NOT ONLY IN” taxonomy query operator?
- How to exclude posts from a category when using this particular format
- Exclude category from Tag Template
- exclude post from displaying in loop if it is in a category, but not in many categories
- I need to create a search form that will display search results from specific category
- Post count for category and tag
- Exclude Posts From Specific Category from Next and Previous post links
- Checking for two categories in query_posts
- How to query post like normal search would do. within search.php page
- exclude categories from search results
- Exclude category from fucntion
- how to query posts and auto assign category if post title has keyword
- How do I call posts with a certain tag?
- Modify WordPress SQL Query to pull from within a category
- query order by category
- Get link which associated with a specific category and tag
- WordPress category widget only show categories with children
- Order by category titles
- Have parent category contain only one post?
- List posts in alphabetical order
- Randomly load categories with latest post
- Set colors depending on category
- How do I query_posts in cat=1 AND not in cat=2
- List all posts in a category with query_post() function
- query_post order desc
- Exclude a category from a query that includes its parent category
- wp_list_pages() exclude category
- Show the latest post from child category?
- Problem with different query loops (and “main loop”) on category template page!
- Exclude category from query
- Functions.php: Exclude Category from “Blog”
- Pagination for query_posts();
- Posts from a category on homepage with category archieves page default css
- function query_posts disabling current_page_menu class
- Woocommerce filter function not updating
- wp_list_categories not excluing multiple ids
- query_posts by category_name and custom taxonomy
- How to exclude posts from category posts count
- Exclude category from foreach loop
- Have posts that belong to multiple categories, exclude some categories from homepage
- Exclude all subcategories in the_category (post)
- I need to exclude from a query a category and a few custom taxonomies
- Exclude categories by ID
- wordpress taxonomy query posts
- PHP dynamical conditional post display
- Posts of specific category on page and excluded from index.htm
- new WP_Query issues
- how can i hide category?
- Homepage custom recent news
- Displaying links to all posts of the same category on the post page
- Post not found when filtered by category ID
- Exclude the category in WordPress
- Exclude categories from postquery
- Sort posts alphabetically by category/custom taxonomy, insert divider between different types
- How can I exclude a category from the main loop with the category name & not ID?
- Show posts from category specified using a custom field
- User level categories
- Exclude category from drop down list form
- Add class to current post in query_post
- exclude certain categories form archive widget
- Different post slug based on archive
- How to remove an item from a custom Walker_Nav_Menu
- Exclude a category and post_type from wp_query
- How can I exclude a particular category from my WordPress Page 1 and Page 2?
- Pagination does not work with query_posts()
- Exclude category from WP_Query args not working
- Assign a class to first element in category in loop
- Displaying Category in sidebar post widget but not in the loop on home
- How to display products with multiple conditions, product_id and category_id
- Query post only from categories that have subcategories
- Category menu that filters out empty categories
- Displaying posts by year
- Paginate WordPress Category Pages
- Problems with explode [closed]
- Exclude Category From Home Page, Display Posts on It’s Own Page?
- Query pages by category
- Customize category query in widget
- Showing one post from each category, paged?
- Call function on a single page
- Excluding cateory not working on my site. how to solve this? [closed]
- How to define category ID in an array?