Need to Order by an ACF Custom field

Hi.

I am building a custom page and I have the Loop defined as a custom query. All works fine but I need to order by one of the custom fields. Does anyone know how to achieve this within Pinegrow.

I can do this manually by editing the php file, but every time I modify the file in Pinegrow it over rights the array.

Here is example from ACF documentation.

// get posts
$posts = get_posts(array(
	'post_type'			=> 'event',
	'posts_per_page'	=> -1,
	'meta_key'			=> 'start_date',
	'orderby'			=> 'meta_value',
	'order'				=> 'DESC'
));

And choses from Pinegrow
Order by

Am I missing something?

Hi @Ephesian,
I don’t think you can do this through a smart action. I think you need to use a regular “The Loop” action. There is an “order parameters” input block that lets you specify ‘meta_value’. If you need more help, let me know.
Cheers,
Bob

Thanks Bob.

New I was missing something simple. I was looking for ‘Show Posts’ and not ‘The Loop’.

Eph