ACF Query string


I’m using a query string looper provider to only pull in posts that match custom field values in ACF and can’t seem to get it to work.

This is the string I’m trying to get to pull in only those posts where the field name model equals whatever is shown in the URL query. eg:

post_type=post&category_name=used&posts_per_page=-1&post_status=publish&meta_key=model&meta_value={{dc:query:query_var key=“model”}}&meta_compare==

Are you able to let me know where I’m going wrong?


Hi Darren,

Thanks for reaching out.
You need to create the array of arguments of the Query and then just use the http_build_query function to format it into Query String. I would suggest you go through the following thread which may help you with this.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.