Query String Looper - Order by metakey and ACF field

Hi!

I’m trying to build something with the looper tool and using the following query string:

post_type=personnel&orderby=meta_value&meta_key={{dc:acf:post_field field=‘c4a-personnel-last-name’}}&order=DESC

Essentially, what I’m trying to do is build out a personnel / team directory and have the list sorted by their last name. I have it set up like this:

  • Custom post type for “Personnel”
  • ACF Field for their “last name”

I’m trying to have the looper build this out through a query string, but it’s not sorting by that value.

Any ideas?

Oh, maybe I solved this?

I simply removed the dynamic content tags and my query string looks like this and seems to be working now:

post_type=personnel&orderby=meta_value&meta_key=c4a-personnel-last-name&order=ASC

1 Like

Hello @stilemas

Glad to know that things are well for you. Please feel free to reach us if you have any queries regarding our theme and theme settings.

Thanks

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