Easiest way to find terms of many posts is to use wp_get_object_terms
function
$your_post_ids = array(12, 13, 18, 22, 343, 5644);
$your_taxonomy = 'location' //you can set many as array
$terms = wp_get_object_terms ( $your_post_ids, $your_taxonomy);
Related Posts:
- How to get the parent’s taxonomy?
- Show Post Count of a Category
- Variable not working in WP_Query
- Get posts by category name
- Query Custom Post Type by Taxonomy
- WP_Query for custom taxonomies showing posts from non-specified terms?
- Custom Taxonomy – fields
- Displaying WordPress posts from post and custom post type in custom taxonomy
- How to display elements of different post types?
- Custom Taxonomy’s Label to change the text appearing in Appearance > Menu
- How to completely disable a taxonomy archive on the frontend?
- How to limit the number of terms (terms acts like categories)
- How can I list all the categories under a Custom Post Type (taxonomy)?
- Query Custom Post Type taxonomy type based on page
- Counting Posts of a Given Post Type Having a Specific Taxonomy?
- How to show term-specific post list, without posts associated with child terms?
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Querying Posts by Taxonomy From Alternate Network Site
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- Query for posts in 2 taxonomies
- Custom post type taxonomy template
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?
- Paginated Taxonomy Term Archive including one post per term
- Taxonomy Templates
- Custom Taxonomy Creates Unwanted Integer Terms on Post Save
- Is it possible to create a shortcode that will query a post based on taxonomies?
- tax_query returning all posts instead of selective posts in WP_Query
- wp_query to find posts by year and month
- Custom Post Type Loop within Shortcode
- How to check the terms in single custom post type template
- How can I move a custom taxonomy and its data from one post type to another?
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Custom Taxonomies not appearing in Admin
- Custom Post Type Taxonomy Filters
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Custom post taxonomies as tax_query terms?
- Get related posts of child term of custom post type
- Custom WP Query on custom meta and sort by multiple meta keys value
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- WordPress Doesn’t Generate Taxonomy Archive
- Custom post with more than one custom taxonomy
- Get the taxonomy of a post hierarchically
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- How to get list of taxonomy slugs ordered parents>childs?
- Different Category system needed for the Custom Post Type
- Rename a slug label
- WordPress wp_query() basic question about args
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- How to define a term for custom taxonomy
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?
- Query all post and CPT from 2 specific taxonomies AND by ACF custom field
- How to get the post terms from a child taxonomy
- display posts of custom post type with custom taxonomy
- WordPress multisite – is it possible to have different taxonomies for each site?
- Query custom post types & Taxonomies and list them in a table on a page
- How to show list of taxonomy terms associated with specific post?
- Exclude latest post from WP_Query taxonomy term loop
- Creating custom post type posts and associating them with a post from another custom post type
- I have custom post type with custom taxonomy. But not found the taxonomy page..
- Group Custom post type in a taxonomy page by its child taxomony
- Getting List of child terms from custom taxonomy parent
- Custom taxonomy query showing more than 4 posts
- WP_Query order custom post type with certain meta key value by post modified date
- Cant’ Display Custom Post Type Title Base on Tax Terms
- wp_dropdown_pages with tax_query clause
- Display featured posts for a custom post type by taxonomy
- What is the most efficient way to execute recursive complex queries?
- How to get post count of specific taxonomy that have store name & category
- Duplicate slug/permalink issue while adding same post name
- Filter taxonomy by CPT
- have to do a while have post to show for two custom post types sharing the same taxonomy?
- display post count in archive page that have relation with another taxonomy term
- How to search through all child taxonomies using WP_Query?
- Get all posts for custom taxonomy term
- tax_query not working?
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Taxonomy’s title
- Display all posts from single taxonomy term
- Connect 8 Taxonomies to One (Main) taxonomy. How to?
- Filter By Term Not Working – Custom Post Type
- Get posts of an specific term of a custom taxonomy
- Checking Taxonomy Terms for a Custom Post Type With get_the_terms Not Working
- WP_Query for CPT with filter by another WP_Query
- How to query posts by meta keys AND under specific category?
- Shortcode display CPT Query only showing 1 post?
- Custom post type post taxonomies
- Storing/querying custom date data
- category_name not working in WP_Query
- Catergory args causing loop not to show
- List custom taxonomy terms
- Display associated taxonomy child name on single CPT page
- Issue On Listing Woocommerce Parent Tag List
- How to add to taxonomies to a post type
- Filtering custom post types using category taxonomy
- Is it possible for post and custom post type to share a category base slug?
- Query custom post type and group by taxonomy
- How do I get parameters from the URL?