Have found the solution
I only have to add the right tax_query…
$posts_info = new WP_Query(array(
'post_type' => 'tarife',
'posts_per_page' => 3,
'post_status' => 'publish',
'post__in' => $products,
'orderby' => 'title',
'tax_query' => array(
array(
'taxonomy' => 'tarif_kategorie',
'field' => 'slug',
'terms' => 'info',
),
),
));
$posts_gf = new WP_Query(array(
'post_type' => 'tarife',
'posts_per_page' => 5,
'post_status' => 'publish',
'post__in' => $products,
'orderby' => 'title',
'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'tarif_kategorie',
'field' => 'slug',
'terms' => 'glasfaser',
),
),
));
Related Posts:
- List custom taxonomy specific to one custom post type
- WordPress query posts by custom post type not workng
- Display all posts in a custom post type, grouped by a custom taxonomy
- Custom Taxonomy with Custom Post Type Finds No Posts
- Get custom post type by category in a page template
- Associating an “author” with a custom taxonomy
- TV Show database – Best way for structuring it?
- Correct way to use a form to to filter custom posts by taxonomy terms?
- Showing current taxonomy terms
- automatically create taxonomy with same name as post title
- Query posts by custom post type and custom taxonomy
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- Randomly placed sticky custom posts complemented by blog posts
- How to display the rest of categories on Portfolio filterable
- After deleting a post are terms, and custom meta deleted?
- ‘category__and’ for custom taxonomy?
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Programmatically adding posts
- Keep main articles and author blogs seprerate, News / Magazine like site
- removing custom tax & CPT slug, adding taxonomy term in front of custom type
- How to customize admin posts based on the user who is logged in
- Show Two custom Post type and their posts on category page
- How to create an advanced filter search?
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- How to insert content from another Custom Post type into Post?
- Filter by custom taxonomy slug on a custom post type
- Only show posts from a certain category?
- Am unable to reset a query properly
- get_attached_media() on author page not working
- Get next and previous 3 posts in a term in single post page
- Custom loop with multiple taxonomy queries
- Custom post type multiple loop by taxonomy term
- Return the latest post from a custom Taxonomy and Post Type
- Displaying CPT and custom taxonomy side by side in Bootstrap 4 component
- Hide parent categories when clicked, and show it’s childs
- What’s the WP way to load remaining custom posts?
- Full Custom Post Type List Organised by two Taxonomies
- How to add attributes to taxonomies that may be different from post to post?
- How to produce a sub-page-system in WordPress
- Only show posts with date of today or in the future (i.e don’t show past posts)?
- get_the_title() is returning results from previous loop
- List Categories (wp_terms) and count posts
- Control content before and after custom post type loop
- attach CPT data to a taxonomy
- Displaying multiple post types on home page
- display posts of custom post type with custom taxonomy
- Creating a non-hierarchical Taxonomy that behaves like categories
- Custom Post Type not showing in main loop
- My custom taxonomy is only displaying 1 of 3 terms
- Custom Post type content within a slider
- Custom Post Type and Taxonomy Loop Output Is Wrong
- List all Custom Post Type posts excluding certain Taxnomy term
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Add Class according to the order of appearance
- Compare Two Custom Post Types Using The Same Custom Taxonomy
- Get terms for a specfic post from multiple taxonomies in custom post type
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Loop and add Specific Categories and Products Images
- Loop for custom-post-type comparing taxonomy terms for “related” posts?
- Is it possible to have hierarchical taxonomy and hierarchical custom post types in one permalink?
- How do i display post from a taxonomy term?
- Custom taxonomy not saving correctly
- What is the most efficient way to execute recursive complex queries?
- How do I ensure that post_type and Taxonomy use the same slug?
- How can I loop at a Specific Taxonomy from a custom post type?
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- Custom archive page for custom taxonomy and pagination issue
- How to display list of custom post taxonomy terms and their posts (if any)?
- Custom post type paging return home page
- WordPress next post by ajax call on button click
- Excluded Custom Taxonomy Term Posts Displaying in loop
- Some posts not displaying by taxonomy term
- posts_per_page is not working by term
- My post loop needs to have 8 different post templates
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- Adding a Section for Visitors
- How can I group by Taxonomy on Custom Post Type while filtering out based on custom Meta
- % encoded URL giving 404 error in WordPress
- Loop to display parent categories in custom taxonomy
- Add active class to foundation 6 tabs while looping categories
- How to show terms used only for particular custom post type. Filter creation perpose
- Help with Travel Guide Setup
- Show posts for current taxonomy
- Custom taxonomy page template
- Loop with Custom Post Type and Taxonomies
- Loop multiple taxonomy in custom post
- Post data in separate divs with incrementing class using WP_Query
- Sort by Custom Post Type (Multiple Loop)
- WordPress Custom Post Type and sort by Tags
- Display posts from category in page
- Get link for feed of specific post type AND taxonomy
- Turn post into simple slideshow
- Sorting custom post types by taxonomy (So close)
- Looping taxonomy in taxonomy?
- Listing custom post type items from a couple of custom taxonomies
- Catergory args causing loop not to show
- Get all active posts that are tied to a custom taxonomy for a custom post type
- Same slug for Custom Taxonomy archive and CPT archive – Rewrite rule not working
- Complex Custom Loop with Includes
- Custom post type URl Cutomization