# Bricks query loop + meta query

**URL:** <https://forum.bricksbuilder.io/t/bricks-query-loop-meta-query/11500>\
**Category:** Uncategorized\
**Created:** [April 14, 2023, 2:55am UTC](https://forum.bricksbuilder.io/t/bricks-query-loop-meta-query/11500 "2023-04-14T02:55:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dee](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/dee/32/3277_2.png) [@Dee](https://forum.bricksbuilder.io/u/Dee)\
**Post date:** [April 14, 2023, 2:55am UTC](https://forum.bricksbuilder.io/t/bricks-query-loop-meta-query/11500/1 "2023-04-14T02:55:03Z")

</div>

hey guys, I need some help in here.

i have 2 cpt,  
1- event - event has acf field club\_name ,  
2- Club Name -

i need to fetch Related latest Event (that has acf field club name selected) on the CLUB page footer .

i assume bricks can do this with no coding ?  
block \> query loop \> meta key : {club\_name} , meta value : {club\_name} , compare : LIKE. ?

is there anything I’m doing it wrong ?

---

<div class="post-metadata">

**Author:** ![aslotta](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/aslotta/32/5419_2.png) [@aslotta](https://forum.bricksbuilder.io/u/aslotta)\
**Post date:** [April 15, 2023, 10:23am UTC](https://forum.bricksbuilder.io/t/bricks-query-loop-meta-query/11500/2 "2023-04-15T10:23:36Z")

</div>

The meta key in your case has to be just `club_name` (the name of your custom field). The meta value needs to be `{post_title}` (since you want to compare the event’s custom field value to the title of the club).

Instead of using a regular text field I’d recommend using a post object field though. See [Video uploaded to CleanShot Cloud](https://cln.sh/73TPzpbz).

_At the end of the video I say that you have to select “Post ID” as the return type for the custom field instead of “Post Object”. This is not true. You can choose both. It does not have any relevance for the meta query._

---

<div class="post-metadata">

**Author:** ![jmcbade](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/jmcbade/32/3375_2.png) [@jmcbade](https://forum.bricksbuilder.io/u/jmcbade)\
**Post date:** [May 24, 2023, 9:26am UTC](https://forum.bricksbuilder.io/t/bricks-query-loop-meta-query/11500/3 "2023-05-24T09:26:19Z")

</div>

This video is gone. Can you please re-post it?

I’m trying to sort out: [Using Meta Query with ACF](https://forum.bricksbuilder.io/t/simple-filter-based-on-a-custom-field/10363/2)

Thank you
