I made it through! I’ll share how I did in case some other person lacking the php knowledge like me lands in the same spot.
add_action('elementor_pro/posts/query/projects_designs_query', function($query)
{
$post_id = get_the_ID();
$meta_query[] = [
'post_type' => 'designs',
'taxonomy' => 'projects',
'value' => $post_id,
'compare' => 'in',
];
$query->set( 'meta_query', $meta_query );
} );
What this achieves is firstly getting the ID of the current post in the loop (which in my case is a Project custom post type). Then it gets all the post (with custom post type Design) that belong to the same project (the current post).
Related Posts:
- How to filter out post type meta?
- creat filter with wp_query
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- Saving Taxonomy Terms
- How can I remove the “Add New” button in my custom post type?
- Taxonomy terms with edit/filter link in wp-admin, in the list of custom posts
- How to get a list of term names of the custom post type im currently on in single.php
- Ajax filter with custom taxonomies
- Query multiple taxonomy in Custom Post Type
- Filter posts with ajax form and checkboxes
- Get the most popular terms for a custom post type
- WP insert post PHP function dynamically generated Custom Fields
- Adding posts of custom type into the main feed
- Inserting data into `post meta` table?
- Get all taxonomies for all post types
- WP_Query search posts by custom post type and custom taxonomy
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Conditional to modify query results
- Modifying date filter on admin page for custom post type to link to custom field
- Get Post Primary Category
- Custom Post type is being ignored in query
- Order By Post Type ThenBy Taxonomy
- Categories of custom taxonomy don’t show any posts
- How to Filter custom post type by taxonomy?
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- search suggest – filter post type
- Display latest x posts from all categories in Custom Post Type/Taxonomy
- How to organise this data within WordPress
- Different Category system needed for the Custom Post Type
- Redirect to another page using contact form 7? [closed]
- How do I add custom HTML to the content of an archive page’s posts?
- Pagination hitting 404 page on /page/4
- Query custom post types & Taxonomies and list them in a table on a page
- Querying a custom post type, but not show duplicates
- Shortcode to return single custom post based on post taxonomy
- How do I get the index for a custom post?
- Custom taxonomy query showing more than 4 posts
- Using page title as a link to term archive
- How to get post count of specific taxonomy that have store name & category
- Page that lists publications by classifying them by taxonomy
- Query filter by value in meta_value array
- Filter taxonomy by CPT
- Check that a slug is present in the get_terms request
- Display category filters for custom post type when category is shared by multiple post types
- Dynamic page for nav items used as filters
- Custom post type order by post_title
- WP_Query for custom taxonomies showing posts from non-specified terms?
- Taxonomies are not showing in the category dropdown
- Taxonomy doesn’t follow slug permalink structure
- Custom Taxonomy – fields
- tax_query not working?
- Sorting on Taxonomy in archive page
- Custom Search not working
- Exclude Custom Post Type from shared Custom Taxonomy
- using ACF datepicker to filter posts on a page
- Looping taxonomy in taxonomy?
- Code in custom widget queries all posts, when it should only query the current post
- Order custom post type is beign ignored
- How do I filter a custom post type loop by a field?
- Custom Filtering date with newsletter
- Show only taxonomy types terms associated with a custom post type in WordPress PHP
- get_terms by custom post type
- How do I dynamically populate wp_nav_menu from a custom taxonomy?
- Adding a drag and drop re-ordering from a custom post type default list [closed]
- How do I list terms of a custom taxonomy at i.e. domain.com/brands/
- Clean URL permalink for custom post type
- How to append element after thumbnail
- Sort posts based on multiple custom fields
- How to make a custom taxonomy selectable in post publish area?
- Custom Post Type without an archive page
- Query custom post type only if it contains another custom post type
- Received nothing after executing AJAX post function
- How to modify archive query with pre_get_posts to append CPTs?
- Genesis filterable portfolio isotope [closed]
- Get parse_query filter to return slug instead of id
- How to add a post slug to a url?
- Categorize custom post type
- Function causing the loop display posting more (empty)
- How to make custom taxonomy into drop down select in a custom metabox
- Custom post type posts don’t show in archive widget
- Including all post id’s of a custom post type into an array
- Filter posts by tax (dropdown) and meta value
- After creating Custom post type by user delete old one
- How to add new post using a form to categories when categories are using as menu
- Different post title, keywords and description
- Catch and display error on save_post action
- Grouping custom wordpress post types by acf value
- Show code dependant on CPT & category
- Adding featured image to a new post using front-end form?
- Set a Default CPT taxonomy by taxonomy id
- Show parent category and subcategory once in while loop
- how to create custom taxonomy drop downs for parents and child
- How to get the posts that my following users are liked?
- Custom 404 redirect for a luddite
- pagination for a custom query
- Filter Term By Parent Term – Custom Post Type
- Posts without featured image using other post’s featured image
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax
- Query Multiple Post Types and Paginate Newly Created List