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
- How do I append multiple taxonomies to the URL?
- 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?
- Order custom posts by taxonomy?
- Query posts by custom post type and custom taxonomy
- Custom Taxonomy conditionals
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- Taxonomy posts on Archive page
- 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
- Why is my custom loop not filtering correctly nor paginating?
- Custom post types with custom directories
- 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 insert content from another Custom Post type into Post?
- Weird problem happening with custom taxonmy when creating/updating posts
- Normal pages as children of my Custom Post Type
- Only show posts from a certain category?
- get_attached_media() on author page not working
- Custom loop with multiple taxonomy queries
- Custom post type multiple loop by taxonomy term
- A question on creating filters for custom posts using taxonomy
- WordPress sort search results by custom order
- Displaying CPT and custom taxonomy side by side in Bootstrap 4 component
- Hide parent categories when clicked, and show it’s childs
- Group CPT posts by custom taxonomy
- How to start a new post with custom Taxonomies already set?
- What’s the WP way to load remaining custom posts?
- Display Custom Taxonomy Alphabetically
- How to add attributes to taxonomies that may be different from post to post?
- Migrating a taxonomy’s tags to the native category
- Listing all term items alphabetically / sorting loop
- Display related custom taxonomy posts in sidebar
- get_the_title() is returning results from previous loop
- custom post type vs. conditionally displaying meta boxes for specific terms?
- Main query not querying any posts in custom taxonomy template
- Move Genesis Single Page/Single Post Title
- List Categories (wp_terms) and count posts
- Displaying multiple post types on home page
- looping though custom post types and only return results in a given taxonomy
- Dynamically insert code to custom post type loop
- Pull in taxonomy field of custom post type in new query
- get_terms() parent, child and grandchild
- List all Custom Post Type posts excluding certain Taxnomy term
- Add Class according to the order of appearance
- Compare Two Custom Post Types Using The Same Custom Taxonomy
- Looping through custom taxonomy and display custom post types (Custom Post Type UI)
- Create a custom taxonomy template that loops through child categories in term order?
- How to list posts by term (custom taxonomy)
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Loop and add Specific Categories and Products Images
- Custom taxonomy not saving correctly
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- Multiple custom post type queries causing wrong post types to be grabbed in taxonomy + single templates?
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- Related “custom post type” using “custom taxonomy”
- How can I loop at a Specific Taxonomy from a custom post type?
- How do I disable the built-in editor and automatically configure the properties of new pages?
- How to have multiple search result pages in wordpress with taxonomy terms listed
- Custom archive page for custom taxonomy and pagination issue
- Custom post type paging return home page
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- WordPress next post by ajax call on button click
- Combine multiple separate lists into one
- Set a Default CPT taxonomy by taxonomy id
- 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
- Why is my loop not populating the page with my custom taxonomy terms from my custom post type?
- Show parent category and subcategory once in while loop
- List all posts associated under custom taxonomy
- Building Link List for Custom Tax
- Display title of all custom posts from same taxonomy term on a custom post template
- Loop to display parent categories in custom taxonomy
- Custom taxonomy template for custom fields loop [closed]
- How to show terms used only for particular custom post type. Filter creation perpose
- Show posts for current taxonomy
- Custom post types not displaying per category
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Custom post type with custom taxonomy permalinks
- Loop multiple taxonomy in custom post
- Post data in separate divs with incrementing class using WP_Query
- Order by custom field attribute
- Display Custom Taxonomy of custom post type
- Loop through multiple custom taxonomy terms and display posts for a custom post type
- Inserting two categories
- display custom post type from register taxonomy
- Advise on Custom Taxonomies and Structure
- Get all active posts that are tied to a custom taxonomy for a custom post type
- cannot export data from CPT UI (books)
- Complex Custom Loop with Includes
- How to develop Knowledge center in WordPress Website
- Create a WordPress loop that shows posts from a custom post type + filters the posts by taxonomies while hiding empty taxonomies
- Add Custom Taxonomy Terms as CSS Classes for CPT Posts in an Elementor Loop Item Template