Bricks Slider query loop . acf conditional output

I have Bricks PopUp Template with

modal
icon
slider (query loop)

Slider set as query loop fetching my cpt “pop-event” .

I need to query the loop and display only post with acf field “lane_popup__options” value is Yes only.

Im confuse how to move from here , cause after slider there is no more elements to filter anymore. !
since its slider, the selection and filter , when does this happen ?

, i m guessing i should filter the post under META QUERY ? is this META QUERY for metabox plugin base field alone ? or can use for ACF Pro as well. ?

If it’s a Yes for ACF . How do i query it ?

Relationship : AND
Meta Key : Yes ?
Meta value : {acf_lane_popup__options}
Compare : Equal
Type : CHAR

my acf field is : lane_popup__options its a SELECT field with the options Yes, No

Cheers

i manage to use this conditions on my event archive page

Dynamic Data
{acf_lane_popup__options:value}
==
Yes

But its not working for slider?

i tested this code. it’s not for this case i guess?

meta is wordpress - it stores all kinds of data as meta. ACF stores all its data as meta.m For a better understanding you can read:

and

Relationship : AND // yes - you want post AND it matches this criteria
Meta Key : {acf_lane_popup__options} // see below
Meta value : Yes // probably :wink:
Compare : Equal
Type : CHAR

It depends how you set ACF to return it’s data, but if ‘Yes’ works in a conditional, it should work in a meta query.

ACF actually stores its data as meta, so you can often just fetch it as meta, in which case just
Meta Key: ‘lane_popup_options’.
If one doesn’t work, try the other. In any case this is exactly what the meta search is for so should work.

1 Like

Hi there, this is not working for me, i suspect the slider doesn’t accept meta query.
you might want to test it at your end ?

cheers

i also wonder why Meta Key as no dynamic field fetch options ? need to manually key in once get it from the Meta Value ? sound like an enhancement needed ?

the moment i add the key to {acf_lane_popup__options} i get zero results.

Set slider to query.
Set query to CPT (pop-event)
It should fetch posts.

Set meta query to:
Meta-Key = lane_popup__options
Meta Value = Yes
Compare LIKE
Type CHAR

Tested and working.

1 Like

Manage to solve this . it seems only nestable slider support this.

set condition to elements slider(nest) , slide1. as

{acf_lane_popup__options} != No

Both sliders support it. You just need to treat META as META in queries (so not acf_my_field // just my_field)
Plus, meta prefers LIKE to = when it’s a string and not boolean.

1 Like

Thank you ! finally i understand how to use this meta query!