advanced-query-loop icon indicating copy to clipboard operation
advanced-query-loop copied to clipboard

Meta Value as the parent posts id

Open jessefriedman opened this issue 2 years ago • 1 comments

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?

jessefriedman avatar Dec 13 '23 22:12 jessefriedman

This is an interesting idea. Leave it with me.

ryanwelcher avatar Apr 30 '24 15:04 ryanwelcher