As per documentation for WP_Query()
, category_name
should be category slug
.
So replace EVENTS
with the slug of category EVENTS
'category_name' => 'events' // Assuming that 'events' is slug of category `EVENTS`
OR
'cat' => 5' // Replace 5 with id of of category `EVENTS`
I hope this helps.
Related Posts:
- Using categories & “stickyness” together
- Sticky posts on home page, search, tag and archives without plugin
- How to make all posts in a category sticky?
- Sticky Posts Not Sticking to Top of Category Archive
- Get sticky post from category?
- How to make all posts in a category “unsticky”?
- “Sticky” posts for each category (archive.php)
- Stick multiple posts in a single category
- Sticky post for each category on category pages [duplicate]
- How to display sticky or latest published post on the current category page it belongs to?
- Category sticky latest
- How do you get sticky posts to work with categories?
- How to display only sticky posts on category pages?
- Could not insert term into the database
- Activate Gutenberg in category-descriptions
- How to show subcategories in categories else show posts
- How would I increase the Author Role to be able to add a new category?
- How to remove the parentheses from the category widget
- Randomise results from a category page?
- Only show category to certain user levels without plugin
- How to: 301 Redirect /category/ to /customname/
- Custom Query to search through categories
- Display one latest post from multiple categories
- Archive pagination causing 404 with permalinks structure
- Remove word “Category” from WooCommerce product page [closed]
- Get a list of Terms for a specific category
- Remove Archive Headline and Archive Intro Text fields on category and tag archive pages in WordPress Admin with Genesis framework
- How Do I Merge Categories With phpMyAdmin
- Display name of the last child category
- Edit the markup of categories list
- Show category children, one level
- a-z list, categories and sub categories in loop
- Category slug $_SERVER[‘REQUEST_URI’];
- Viewing category pages without the word ‘category’ in URL
- How to view WordPress’ default category IDs?
- Random taxonomy category list
- how to change template?
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Product Category WooCommerce
- Show all posts for a specific category/author
- Hard coded main navigation
- Resort get_categories
- Display posts separated by Category in Author’s page
- One Specific Category To Permalink
- WordPress category widget only show categories with children
- Multiple category archive page
- List subcategories of active parent category (WooCommerce)
- How to display post type and category links in foreach WordPress code
- Updating category template to change how subcategories display
- Add multiple classes. Different style for each category tag
- Inside a loop, how to change CSS class based on category name?
- Add a custom category page in WordPress.org
- Remove the parent name from permalink
- Make parent category an optgroup
- Randomly load categories with latest post
- Is it possible to remove from default category widget?
- WordPress alphabetical A-Z custom post type post result display
- Count category views – Is it possible?
- wp_dropdown_categories not showing option as selected
- Combine “category search order” with “don’t display child posts”
- How to check if a post belongs to a category that has only 1 posts?
- category__not_in and id values from variable
- How do I use just one category’ posts on my home page?
- If x comments in a post move post to category y
- Count tags for a specific category
- wp_list_categories walker without links on categories that have subcategories (to make a nested dropdown menu)
- How can I display tags as categories?
- Adding additional content on post depending on post categories
- Set category page title in custom theme [closed]
- Root category template?
- wp_list_categories not excluing multiple ids
- Custom meta boxes ID prefix showing on first category but not others
- Exclude category from foreach loop
- ID of last created category
- Show Secondary Sidebar on Category pages (archive)
- Get categories of queried posts
- Limit Loop to One Category
- wordpress taxonomy query posts
- Conditional category query breaking?
- Different header for each category
- 3.1 post formats and specific categories/custom taxonomies
- sidebar troubles, taxonomy trouble
- Code for Category, Tags, Archive URLs
- Duplicate new categories across multisite network
- Display all subcategories from parent category
- How to show WooCommerce Categories on ‘shop’ page instead of products?
- How to list all subcategories from all categories but not from a certain category
- How to create Child Category page from scratch at wordpress?
- Automatically create tags and merge with categories
- How to insert category to post via php?
- Show Subcategory Name Instead of Parent Category
- Get category id of next / prev post inside the_post_navigation
- Limit Category/Tag Dropdown To blog_id in Multisite Install With Global Categories/Tags
- Code to display category-specific single.php is overriding normal single.php, too
- Media Library filter returns undefined function get_current_screen
- Custom built theme won’t filter categories
- get IDs from links categories
- Display all subcategories for a product category in woocommerce
- Narrow Down a Shop Page Results Based on a Product Tag in WooCommerce
- How to control order when displaying child categories
- Replace category titles inside RSS feed