Try something like this:
With the post_type the name of your CPT
$args = array(
'post_type' => 'your_cpt_name',
'tax_query' => array(
array(
'taxonomy' => 'job-sector',
'field' => 'slug',
'terms' => 'industrial',
)
)
);
$query = new WP_Query( $args );
Related Posts:
- Custom Post Types, slug, archive and SEO plugins
- Automatically add date to the auto generation of post slug
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- Two Custom Post Types with Identical Articles Competing for the same Slug
- WordPress custom post type with folder structure in slug
- Where does WordPress store the users customization in the theme
- Add a checkbox to post screen that adds a class to the title
- How to automatically generate a unique random slug
- delete post also attachments
- Attach pdf file to custom post type
- How do I create a featured post within a custom post type?
- Static posts page with home.php
- Delete Post Link to delete post, its meta and attachments
- How to update all post at once?
- How to edit wordpress RSS feed to show post title only
- Add custom field to category of custom post type
- What Can I Use To Add A Custom Button Between Publish button and Move To Trash?
- generate unique slug while inserting post
- Add custom fields to post programmatically
- user contributed content as custom post types
- Remove custom posts that match taxonomy value
- Custom Theme Want To Remove One Category From All Displays
- Post Type Label Name
- wp_query ‘s’ parameter does not work with custom post type
- Blog Posts in Custom Menu
- How to display data in archive page?
- I want to display custom text widgets for each post in the sidebar?
- Custom Post Type – Category Rewrite – Remove Rewrite from Sitemap
- CPT archive redirects to single post
- Prevent Delete Attachment by URL or When Submit
- Enable Comments Box On Custom Post Type
- How can i limit the number of posts created per category?
- Turn On Comments On Custom Post Types in Directory Theme
- Duplicate Custom Post Type and Taxonomy Slug
- Calling Different Custom Post Timestamps in a table
- how do i add posts-page slug before posts slug in permalinks
- Admin – create custom post status and display above table
- How to allow visitors to filter posts by multiple taxonomies
- How to include my own css in post
- How to get a post’s content? [closed]
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Customize rel=canonical tag for single blog post
- a little direction on custom post type
- Is codex right on deleting post?
- Create a custom posts page
- Replace image name on upload to the new post name on front-end form
- Deleted a user with administrator rights. Now all the data/content/images are lost. how to recover them back
- Custom home page with full post for first one only
- l accidentally permanently deleted a Draft. There’s any way I can recover it?
- Inserting an example of the last 3 post on to the homepage
- Get a term each custom post type
- Getting post and attached image from subdomain
- Custom post type slideshow background images to insert in a plugin
- Trying to exclude custom posts based on date, while sorting by custom field
- Help on conditional statement to accompany wp_insert_post function please?
- Search results for ACF data
- Redirect to custom post if custom archive page has just one result?
- Added a ACF field to custom page and want the results to show as a column in admin
- Template for displaying CPT / Taxonomy URL issues
- Multiple posts in one page
- delete post hook not being fired when deling in wordpress dashboard admin
- WordPress Delete Users from backend doesn’t work
- Is it possible to make a custom post that adds multiple pages?
- Loop through taxonomies and loop through their terms (Newbie question)
- Slug collision between page, taxonomy and custom post type
- Hiding title of selected post without plugins
- Custom post styling per category?
- Custom post type – Loop out in random order but same 15 to appear first… still random
- Custom post type template not called
- How to use Categories of custom post type
- Problem to get the link of the default ‘post’ post type like the orther custom types
- Static text above category page
- Hook To Get All Posts Deleted
- Meta boxes not saving
- Custom URL Structure for posts with subcategories
- Help with a function that will place a map pin for all posts
- How to show the posts list into a static page? Problems to use the loop into a static page
- Get new post meta data when (custom) post is saved
- How do I control the fallback query after the original query returned cero posts?
- Adding The Post Template Dropdown to WP-Admin
- wordpress paginate, link to the right page
- Allow users to create their own page/s
- 404 for some custom taxonomy not ALL taxonomy
- Given two custom post types: Automatically add meta fields from one custom post type to another
- Display metabox with date
- How can i retrive the movies, trailers, news in a single page using search
- Add default content to post (for specific category)
- get post custom value
- WordPress strips some attributes for author posts
- Automatically delete default posts and pages on theme install?
- How to Do Custom Fields to Output a Definition List
- Display one post randomly from category on home page
- Deleting first four characters from all Post Titles
- Deleling wordpress posts permanently still have IDs
- Post’s arent displaying
- Can I get custom post items in select box (dropdown)
- How to have 2 posting pages on a blog
- Dynamic Menu Item
- Changes done in admin panel are taking time to reflect in the REST api responses
- I have a website issue I am trying to resolve