advanced-query-loop
advanced-query-loop copied to clipboard
Meta Value as the parent posts id
I am working on a unique customization where I have two CPT's (Projects and Tasks). Tasks can be assigned to a Project with a custom Meta Key and Value. Where the Key = "parent_project" and the value = the project's post_id.
What I'd like to do is use ACF in a custom template and pull all jobs that are "children" of the parent project. To do this I'd need to be able to run a query for Meta Key = "parent_project", Meta Compare = "=", and Meta Value = "current posts post_id".
tl;dr Is there a way to add the post_id of the current post you're viewing as a variable of the meta value?
This is an interesting idea. Leave it with me.