It sounds like you’re looking for wp_get_object_terms()
which takes an array of post IDs, a taxonomy, and some optional arguments to determine what to return.
So, you’d use get_posts()
to query future events, build an array of IDs, and then pass that array to wp_get_object_terms()
.
Related Posts:
- Archieve.php not loading for custom post type
- Meta data (Tags and Categories) for Custom Posts not showing.
- Save data is post using php front end
- Get meta values from parent post and save in child post
- How to change permalink structure for custom post type and it’s taxonomies?
- Filtering a custom post type by custom taxonomy in archive template
- How to build a complex page structure
- Load custom posts with same tag as page
- Hide/Show only specific categories in wp-admin new-post.php
- Ordering posts having multiple post-meta date fields
- Get categories for a specific post – Custom post type
- Include custom post types in categories widget
- How to get dynamically custom post type that are under a certain category
- Listing and accessing categories for a custom post type
- How to show related posts by category or custom post type?
- Custom Post Type, Two categories, Two columns with Pagination
- New WP_query in template not working with CPT+category on some pages
- Taxonomy list. Order by a specific custom post type count
- Custom/separate categories for custom post type
- Categories not working as expected with custom post type
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- Display types of posts in edit.php instead of All, Published, Scheduled and Draft
- Get categories and descriptions from custom post type
- How to create new category for custom post type?
- Does WordPress limit the length of slug names for Post Meta or Terms?
- How to show CPTs in term archive
- Insert Multiple Post with Same Publish Button
- Group posts by custom post type
- Undefined Variable – Custom Post Type Meta
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- Categories of custom taxonomy don’t show any posts
- Post image in WordPress not appearing on home page
- Getting meta in editor plugin, and event triggering issue
- Can’t remove front from permalinks for custom taxonomy category page
- Metabox not show in categories custom post type cmb2
- Adding custom post type to count in category
- Pre-selecting the category for a custom post type
- List of Posts and Categories
- Show future events based on custom field AND order by date
- Create new custom post and post category of same name
- multiple custom post type on category page
- create custom meta box with default value
- Issue on Working with Metabox – Checkbox to enable Sale Items
- How to move a post to different post type with all meta data?
- Why do I have to press the “Update” button twice to save my meta box values?
- WP API Response does not show my registered metadata
- How to detect that the save_post hook is calling the callback associated to the current edit post page only
- Custom Post Type Categories URL not displaying posts
- WP Query results showing posts outside of category ID
- How to get the current category with custom posts
- Showing all posts and custom post types by using one category
- Problem with adding custom post type meta to header by plugin
- How to call a post’s metadata in shortcode.php?
- Echo custom post meta from options array
- Value of post meta dropdown is not showing in WordPress
- WP_Meta_Query object with conditionals
- Trying to write shortcode with get_post_meta but isn’t working
- List child categories from parent category on custom taxonomy page
- How to properly use Categories with Custom Post Types
- updating one custom meta field only
- Custom post type category permalinks and archive pages
- Can’t Get Parent and Child Categories of Custom Taxonomy to Display
- Display custom post types by category
- Searching in multiple category + URL hierarchy in real estate WordPress site
- How to display custom taxonomy term specific post?
- Category permalinks don’t work even after flushing
- Show posts from WP Custom Post Type selected from a field in a metabox
- How to sort post category using its Description
- Custom WordPress theme not displaying posts from category
- Wanting to list all Post types under a common category
- How to show posts of the same category on a page?
- Peepso: Add extra data field (custom post meta) to postbox
- Change picture attachment meta of all occurrences of a picture
- Get Previous Post based on Custom Field Name, for Custom Post Type
- Saving custom post types post_meta over REST-API fails
- Modify the category post counting function
- Reuse the “category” slug for a custom post type
- Stripe multiple transactions
- Custom post types not displaying per category
- How To Display Category list from Portfolio post type plugin?
- Edit is changing my custom’s post type parent id
- Dropdown switching subcategories portfolio
- WordPress custom post type
- Custom Post type archives / categories give 404
- Edit post meta direct from post.php?
- Custom Post Type – Admin Columns
- Problem to show custom post type in archive page category wise
- Timetable of Custom Meta Data using Custom Post Type and Custom Taxonomy
- Category / Custom Post Type permalink issue
- Change the contents of a dropdown through the admin panel?
- Categories in custom post types
- Sorting custom post types by category?
- Categories and page filtering with pre_get_posts
- fetch meta fields inside a widget
- Get all custom_post_type posts + blog posts from one category in a single query
- Custom post type – update_meta not working
- Select Category as Page Parent
- Use a Variable in update_post_meta as the $meta_key
- Custom Post Types Permalink
- How to add categories to a custom post type using wp_insert_post($new_post);