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 do I create an archive page as a including metadata?
- PHP variable not regenerating when publishing multiple posts at the same time
- changing meta value and meta key of price field
- Posting to a Custom Post Type from front end – user generated content
- Multiple level category drop-down from the WordPress dashboard
- Update Post Meta for a logged in user
- Getting meta in editor plugin, and event triggering issue
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- How to duplicate entire custom post type
- Add custom post type settings to wordress default posts
- A better way to add a meta box to custom post types
- Restrict Access to Posts based on Custom User and Post Meta Data
- Hide parent categories when clicked, and show it’s childs
- Two Custom Post Types Many to Many Relationship
- Limit amount of posts made within a custom taxonomy
- Problem with displaying posts in the CPT category
- get_post_meta not working on publishing
- Filter CPT posts by one or more categories
- Getting categories of posts under a custom taxonomy
- Should wp_postmeta meta_key always be unique for a given post_id?
- Custom Post Types with a common category for a blog listing
- how can I register a post_meta field in an existing CPT and then call it again with get_post_custom()?
- get_post_meta returning no value in custom post type alert email
- Can’t remove front from permalinks for custom taxonomy category page
- How to get categories linked in posts for a specific post type
- Custom post type, organized by categories
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- post meta parameter in post custom-post-type endpoint with restapi
- How do I set all of a particular post meta to a value within the custom post type I’m in?
- Remove CPT name from permalink but add %category% instead
- Set a checkmark in a category based on a URL-parameter
- Update postmeta Parent when post_status child change
- WP Query with categories only shows one post and ignores the category
- Metabox not show in categories custom post type cmb2
- WordPress request fiter order by related post’s post_title
- Adding custom post type to count in category
- How to edit this code to get the categories in achieve page?
- Category with post type pagination returns 404
- Custom Post Type and Category Base Rewrite Issue
- Get the category from custom post type
- Post injections into Site Origins Page builder [closed]
- Custom Post Type + Categories
- How to create a gallery page with categories?
- Custom Post Slug same as Parents Category Slug
- WordPress posts page for customer filtering and sorting along with category filter
- I am having Trouble to get list of Categories of Custom post Type
- Hierarchy and access control for Custom Post Types (CPT)
- Multiple (two) category postings on the same page.
- Update database from Quick Edit according to Checkbox state of Custom Post Type
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Loop filtering Custom Post Types and/or Categories
- School & class blogs: Categorize with categories or custom posts?
- Custom post type and category link together
- Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
- Why is my category template ignoring post type?
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- Dynamic Custom Fields
- How to get custom posts sub category link
- Show Custom Post Type meta boxes only on Page Edit
- Not sure if I should create multiple custom post type [closed]
- Cross reference custom post types
- Make a custom_post translatable
- Pre-selecting the category for a custom post type
- Custom filter function not working with Custom post type
- browse by category and tags?
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- Categories filtering in new post
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom post types and category archive
- List of Posts and Categories
- Importing Data from a Non-WordPress database, into WP
- How can I show 1 featured post in a styled element, and the next few below differently styled
- Getting thumbnails of a custom posts featured images in a page-templates metabox
- How do you create a custom template to display a category with an image and related posts below?
- How can I list Custom Post Types created with the Types plugin under categories?
- Remove Post Custom Meta Box
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Custom templates for a specific category
- Custom fields for custom post type
- Show future events based on custom field AND order by date
- CPT category hierarchy
- Categorise Custom Post Types
- Meta Data for Custom Post Type not saving
- Using preg_replace to filter custom textarea
- WP the_posts() on single-cars.php get category link
- Category.php template for custom posts
- How to retrieve category of a post in have_post loop?
- Check if post with same meta value exists
- Filter date from post meta when date is in string format
- Categories and tags for custom post types
- Create new custom post and post category of same name
- Tag page only display 10 posts
- category page for custom post type
- Get only used meta_values