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’
- Optimize post insert and delete for bulk operations?
- The next_posts_link() works only with original $wp_query
- Get Next / Prev 3 Posts in Relation to Current Post
- $post->ID and the_id() always return the wrong value
- Query *only* sticky posts
- Elegant way to include only published posts with get_objects_in_term()?
- Callback for wp.autosave.server.triggerSave();
- Disallow Same Post Title
- How can I see a list of pages and post where my custom Gutenberg block is used?
- Adding a div class or id inside the_content()
- Delete Child Posts
- In what sequence are the hooks fired when a post is “published”?
- Number of posts per page setting is not working?
- $post->ID displays wrong ID
- how to display post content without post image?
- Pagination for Pages and Posts
- How to allow slashes in single posts when i click in the edit permalink button
- Load post content into div with ajax
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- wp_enqueue_media() slows down my WP site
- Edit menu item title from edit page/post
- Including new Javascript only after a comment is made
- Don’t post or draft if post already exists
- add filter to “quick edit menu” in wordpress admin
- URL Rewriting if it is a single post / redirecting post – post type
- Archive Page for Custom Post Type is not Working
- Multisite – Get current post id
- how to remove dash (-) post status from post title on posts listing page wordpress
- Static page does not show my posts
- Errors when uploading images in WP 3.5
- How can I replace WordPress standard process of editing posts with making WordPress use a custom page? [duplicate]
- Post’s “Read More” redirects to wrong post
- How to hide html tags on revision comparison pages?
- Hook in to add new post link wp admin?
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- Dynamically switch template on click
- Tell WP to use a specific template file in posts
- Create a list of posts with topic headdings
- Add field to user meta table in database when link is clicked
- How to get post content from an array of ids?
- Hide custom metabox value from custom fields
- See if a post has a specified tag
- Images showing up in Post Editor, but not in Published Post
- Custom wp-query in wordpress rest api
- Custom Fields for Author Box
- Custom home page with full post for first one only
- Need to know custom code to display random and most viewed posts in wordpress posts and pages
- Load widget only on blog posts
- Change the background of each post according to the category
- Issue with first top post display order
- Let Posts be stored in another table
- Widget to show posts in the sidebar basing on its IDs
- Page of posts made to look like homepage
- How can I to add upload functionality outside of the admin area?
- How to limit number of posts on AMP homepage
- Related post not showing table of content
- What is proper filter or hook action to add data to the $post object?
- Added a ACF field to custom page and want the results to show as a column in admin
- How publish post from pending status
- Blog Page doesn’t show summary but full content
- Change WordPress names duplicate titles (url)
- Show 5 posts and than 3 posts offset with pagination
- My posts page is missing the page title
- Start loop from specific post ID
- Connection dropped due to file size
- How to Get Position of a Post from a category and tag
- Custom author search
- WordPress template next_prev
- My blog “page” used to show a list of posts, but now it’s just showing the page content?
- Grab next post title in archive page
- unused post IDs
- get_post_meta property of non object
- Combining multiple conditional statements [closed]
- First post in loop displays twice
- custom post type single page template not working
- WordPress posts [closed]
- Export Posts Without Categories In An XML File
- Fatal error: $post is null?
- Get featured image thumbnail and inserting into custom field on wordpress posts
- ERR_CONNECTION_RESET on post save or add media
- How to specify a post category for the home (posts) page?