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
- How to Filter the Custom term loop based on dropdown
- How to get all taxonomies of a post type?
- Pagination not working with custom loop
- Renaming Custom Post Types and Taxonomies
- get_terms by custom post type
- single-{$post_type}-{slug}.php for custom post types
- Row actions for custom post types?
- remove custom post type permalink
- Get Posts by Custom Post Type ,Taxonomy, and Term
- Custom Taxonomy as checkbox or dropdown
- Filter by custom field in custom post type on admin page
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- How to change permalink structure for custom post type and it’s taxonomies?
- Get the first post term
- Media library – Limit images to custom post type
- Get the ID of the latest post
- How to display categories of my Custom Post Type?
- How do I append multiple taxonomies to the URL?
- Inconsistent temporary 404s on whole install | PHP error with post-template.php
- Sort search results by post type
- Display a query with multiple post types and same relationship on a single page
- How to order posts of a custom post type by date DESC in dashboard Admin?
- Custom Taxonomy as Dropdown in admin
- How to remove Filters from post admin page?
- Custom Post Type Archives by Date and Taxonomy
- Sort custom post type list table by display name of a user id stored as post meta value
- How to use a custom post type as front page?
- Custom sortable columns ordered by meta-value?
- Creating “static” taxonomies to choose from, inside custom post type?
- How to change “Draft” string for status of custom post type to “Unavailable”?
- How do I dynamically populate wp_nav_menu from a custom taxonomy?
- WordPress Custom Post Types with a page as a parent?
- Modify wp_title for custom post types using custom fields data?
- One custom taxonomy with unique sets of labels for two post types?
- How do I add a filter to my custom post type archive page?
- How to change default taxonomy for CPT only (not posts)
- Add taxonomy or category slug to custom post types URL
- How to determ a custom post type url?
- Custom Taxonomy archive with url parameters