Just some code to get started. This will get you all the IDs for job_listings that are assigned to term 4 in your taxonomy.
<?php
$posts = get_posts( array(
'posts_per_page' => -1,
'fields' => 'ids',
'post_type' => 'job_listing',
'tax_query' => array(
array(
'taxonomy' => 'agency',
'field' => 'term_id',
'terms' => 4
)
)
) );
echo implode( ', ', $posts );
?>
Related Posts:
- How to add images to taxonomies?
- Custom Taxonomy and Tax_Query
- How to modify the query in taxonomy-custom.php to sort term archives by a custom meta field?
- SQL QUERY needed to get POST category (taxonomy) ? – MUST be SQL statement
- Combine multiple custom user taxonomy in single url
- Advanced Tax Query
- Improving WP_Query performance for multiple taxonomies
- Taxonomy , subtaxonomy,child taxonomy of a product woocommerce
- Get ID and slug from taxonomy object
- How to display custom taxonomy in multiple columns?
- Custom taxonomies making WP very slow – Way to fix?
- How to count the number of terms in a taxonomy
- Sorting taxonomy columns by meta value numeric
- Get Taxonmy Term ID For Current Post
- Display sub categories and their data of a taxonomy
- Advanced Query Logic With Multiple Taxonomies
- Display only first level children of my custom taxonomy categories
- Is it possible to get all term items from a custom taxonomy regardless of post attachment status?
- Changing stylesheet depending on custom taxonomy terms
- How do I taxonomy terms based on terms they are used alongside?
- Custom taxonomy [year] is directing to yearly archive
- Get posts by term slug only
- Taxonomies on custom taxonomies
- Add Custom Taxonomy for Blog Meta Info
- Search Tool only refreshes Page without showing results
- Getting associated taxonomies
- How to fetch the data from Advanced Custom post when we search specific keyword or field name related to the post?
- How to add images to taxonomy terms? [duplicate]
- one post per term taxonomy
- Show only the sub-categories (and their content) of the current custom taxonomy with ‘taxonomy.php’
- Using Advanced Custom Fields Relationship Field to select a taxonomy term
- Custom arguments in WP_Query
- check if a taxnomy queried in $wp_query?
- WP_Query tax_query – Show results if child has parent X
- Query custom taxonomy for category including children
- Variable Not Working Inside is_author() Array
- How to get related taxonomies based on a category with mysql query?
- Prioritise Pages over Taxonomy Term Root Archive, but not Taxonomy Term Child Archives
- Tracking the name of a custom taxonomy
- Add terms to a taxonomy archive from within the same taxonomy
- Is it possible to filter a taxonomy archive by other taxonomies that are on posts?
- Fill New Taxonomies
- Custom Taxonomies Archive Page 404
- WordPress taxonomy terms archive template help
- Make relation of custom taxomies
- List active taxonomy terms
- taxonomy query on front page
- How do you search for a post by custom taxonomy?
- Next/Previous links in custom taxonomy, where item may belong to multiple terms
- How to query authors by custom taxonomy?
- Adding a query var to taxonomy term archive – gets redirected to the other taxonomy archive page
- How to get multiple Taxonomies not All Taxonomies?
- WordPress Taxonomy Menu
- Primary Taxonomy for Post
- Get taxonomy image for Toolset custom taxonomy through Toolset Views Shortcode
- wp_get_object_terms count on taxonomies within an category archive
- List posts grouped by children of a custom taxonomy
- Make custom post type display with custom taxonomy in url
- Hook to filter based on form value and insert term
- Complex Taxonomy scheme
- Querying posts globally based on custom taxonomy with its own taxonomymeta table
- Foreach for get_the_terms for hierarchical taxonomy don’t repeat Top Level Terms if contains multiple Second Level Terms
- get_query_var(‘paged’) always returns empty
- Return only the custom sub-term for custom post type, do not echo term-parent
- Retrieving custom taxonomy in order, but excluding specific tax IDs
- Display sub-taxonomies based on SELECTED parent-taxonomy
- How to redirect custom post type archive to first term of associated taxonomy?
- Date archive permalinks for custom taxonomy
- Custom Taxonomies Cababilities
- Get posts from taxonomy URL
- How to implement custom search with input fields?
- Custom Taxonomy isn’t working from frontend post submitting
- Base permalink for custom taxonomy
- put custom taxonomy slug in front of their respective term slugs
- Add success message to category add screen
- Prevent users from adding taxonomy terms
- Count Number of Posts in Taxonomy Term in Last 24 Hours
- Problem with removing post tags programmatically
- Query custom taxonomy by term id?
- How can I reduce amount of ifs and else ifs in this specific block of code?
- export and import taxonomy terms from one taxonomy to another
- Find terms in a custom taxonomy based on the hirearchy
- WooCommerce custom taxonomy as meta?
- Get 1st parent category id from post
- Filter by Custom Taxonomy AND Custom Field
- Custom Permalink Structure for terms/taxonomies of custom post type
- Display custom taxanomy on woocommere product page
- How to structure all custom-taxonomy with three verbs(a,b,c) and route them accordingly?
- how do you pull data from two taxonomies?
- Restrict user to terms in a custom taxonomy registered for both posts and users
- WordPress search form and search result through ACF field in custom taxonomy
- Exporting Custom Taxonomy Description without Plugin
- WordPress tag or archive php file customization
- Dynamic value for get_option linked to taxonomy term_id?
- Best Method to Switch Between Terms (Custom Taxonomy)
- Getting the parent terms adds additional empty markup [closed]
- get multiple values from $_GET from multiple checkboxes
- Way to organize content – custom taxonomies or other way?
- Using post type archive page for taxonomy archive
- Taxonomy archive link from term id