If you’re actually using categories (and not a custom taxonomy) then your category-name
needs to be the slug, not the actual name.
If, however, you are using a custom taxononomy (and you’ll know if you are) then you should use
'name-of-your-custom-tax' => 'slug'
You can also see the below links for details.
http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
Related Posts:
- Create custom page in WooCommerce
- WooCommerce – Create Products Programatically [closed]
- How to Use PHP Code In-Page?
- Display featured products by category
- Insert woocommerce products programmatically with featured image and gallery
- Problem with adding programmatically woocommerce product post into category
- Skip in WordPress Post ID’s, can this cause issues?
- How do I change the core post search algorithm? Where is it found/constructed?
- Show posts count for Categories and Tags in wp_nav_menu
- Is it possible to automatically publish a post once a woo-commerce product is published?
- Restore woocommerce orders
- Target only single product page
- Get category slug of the Parent category of a Product
- How to fetch courses in all languages in WordPress?
- How to distinguish pages created by woocommerce?
- Show code only on WooCommerce Pages
- Woocommerce – custom post type of checkout page
- Wp_query WooCommerce products
- How to get only post=’product’
- Stop WP from creating “Sample Page” and “Hello World!” post
- How to Create Editable Blocks of Text for the Homepage?
- Custom Single Post By Category
- Set Post Title to Read-only and Disable Permalink Slug Editor in Gutenberg
- how to get permalink using sql
- how to display full post with pagination on home page
- Show post titles only on the homepage
- how to grab first link in post… and of course call it
- Custom colors for post rows based on post meta value
- Get all posts by post_author
- Linking to page with all posts
- What Defines What Category A Post Picks (if in multiple)
- Delete Post From Front-End and attachment permanently
- Every possible way to get data (posts) from WordPress
- Blog Posts not showing title
- Show info to author only
- Display post category in foreach loop with category link
- How to Link to all posts that have the Standard Post Format
- Multiple posts with fixed order position
- Two loops, one AJAX loop, exclude posts in first loop from second loop, loops are in different files
- Whenever an author saves their post a \" is added next to the double quotation marks
- updating a post doesn’t trigger a function
- Hide a specific category in admin All Posts page (WordPress)
- Force the “Choose from the most used tags” meta box section to always be expanded
- Display Meta Values in Custom Filter – Admin Custom Posts
- Updating post data on save (save_post vs wp_insert_post_data)
- Lost draft under all posts and drafts
- “edit_published_posts” and “edit_other_post” issue
- How to display two blog categories as separate sections on one page?
- Retrieve post ID from “querying” URL
- When changing pages to posts, how do you set up 301 redirects for the page URLs?
- Notification when visitor is on specific WordPress Article
- WordPress custom post type with folder structure in slug
- wpColorPicker – problem with implementation to post meta
- get posts from Custom Post Type & Category
- Font shows up as Arial instead of Times [closed]
- Fast publishing in wordpress
- Getting Duplicate Posts on Home Page with Widget Added Between Posts
- How to group only VISIBLE posts? [closed]
- wordpress posts template remove default template from menu
- Shortcode with ‘year’ parameter
- Does WP automatically tag posts into the archive?
- Getting property of non-object when looping through post objects from ACF
- How to get the ability to change the author of a post
- Defined function isn’t showed on page
- Show custom post with custom categories with specific slug
- Updating permalink structure using ‘post_link’ filter results in 404 error for posts
- Hide thumbnail if there is a gallery on the post
- Display amount of pending posts in back/front end
- Shortcode for tables which can include comma and linebreaks
- Auto post Spams on my wordpress blog?
- Indenting within a blockquote
- How display related post only in Default category on single
- Change published date and time using SQL query for page in every 5 hour
- Open posts in popup window
- How to merge the content of posts that have the same title?
- How can I pass form entry to another form on a new page
- How do I assign an attachment to a post using only the REST API?
- Limit front-end submitted posts by role
- No blocks available when adding a new post
- Page with Category Returning 1
- Colorbox not working on native WordPress gallery when gallery is loaded thru AJAX
- Customizing URL slugs of Custom Post Type and Taxonomy make posts/pages 404
- Allow reader to reorder posts for themselves (oldest first)
- Is it possible to completely replace a post with an action/filter?
- Surrogate ID for posts, is there an alternative field in the posts table?
- Expired Post with More Recent Time Stamp?
- Post preview in iframe without saving the post
- Set post beginning date and final date
- How to get only current images of a post
- How do I get thumbnails?
- Using Post ID and Page ID in same function
- How to Include a common category in a custom Category Search
- How do I insert a custom field in a user submitted post?
- Viewing category won’t show up Custom post type posts
- Get attachment if matches a variable
- Show Next/Previous without Link
- Hindi content automatically converting to unreadable language?
- I can’t edit my posts
- Displaying all images from a WordPress post (including media library)
- WordPress shows a count of published items on the site, but the items are not appearing when you click on the “published” link