Looper displaying and ordering portfolio items by ACF values

Hi there, trying to set up a particular looper behaviour, but not really getting anywhere. I’ve looked at a bunch of similar posts on here and the various ACF/looper videos and docs and can’t quite wrap my head around it.

I have a looper that I want to output a list of certain portfolio posts. There’s s a radio button ACF field called training on all portfolio items with a value of Yes or No. I only want those with a value of Yes to be output.

Additionally they all have an ACF field called training_date, which is a date picker type. I’d like the output list of posts on the looeper organised by this field.

I’m assuming there’s a query string to get this to work but so far I haven’t cracked it.

Hello @jasoncoburn,

Thanks for writing to us.

To display based on the custom meta field(ACF meta field) you need to looper query strings, I would suggest please have a look at this thread to learn more about how query strings work.

You may check this thread to learn more about how to display posts based on meta value.

Hope it helps
Thanks

Thanks for the info Prakash! However it seems that I’m having trouble with even a really basic query string. I’ve input post_type=portfolio just to try and call all portfolio items to start, and it’s not producing any results. Is there something really basic I’m missing?

Hi @jasoncoburn,

Have you added any elements to show the output inside the Looper as shown in the given screenshot? If not please use The Title element to show the title or use the Text element to add Dynamic Content tags to show the value of the Looper.

Screenshot-2022-08-24-152300

If you have already added that, but still you are not getting anything, there might be some different reasons behind your issue. I would like to suggest troubleshooting the following common issue to help us to recognize the reason.

  1. Theme Related Issue
  2. Plugin Conflict
  3. Theme Update related issue
  4. Child Theme Related issue **if you have activated it.
  5. CSS/JS Customization
  6. Disabling Cache
  7. Disabling CDN

If you discover that an issue is coming from a custom code or 3rd party plugin, kindly consult with a developer or contact the plugin author. Please note that we do not provide support for custom codes and 3rd party plugins.
If none of the above helps, please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Thanks Tristup. I’ve tried this set-up on a blank site with no plugins or child themes, only Pro installed, and I’m still having the same issue. Using the query builder I can call portfolio items and they display successfully, but not query string. Will include site details below.

Hi @jasoncoburn,

I am really sorry that I missed that you have used the portfolio as post_type, it should be x-portfolio to get the posts out of it. I have added that to your sample page and it is showing the titles.

Thanks

Ah, I figured it was something simple like that, thanks! Managed to work the rest out once I got over that stumbling block, cheers.

Hi @jasoncoburn,

Glad that we are able to help you.

Thanks

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