Query Loop | WordPress.org

[ad_1]

Plugin Author
WPLake

(@wplakeorg)

Hi @carlbtmn

Only official ACF fields are currently supported.

Do you mean, you’re using ACF Views already but have an issue with same value for all? If so, try putting the shortcode in the post/page template.

  • This reply was modified 17 hours, 17 minutes ago by WPLake.
  • This reply was modified 17 hours, 17 minutes ago by WPLake. Reason: Clarity

Correct, I’m using ACF Views using the shortcode inside a query loop in the homepage. Each post has different values, but for some reason they all show-up with the most recent value. What do you mean in the post/page template?

Screenshot of the list view:

Plugin Author
WPLake

(@wplakeorg)

Thank you, I think I understand better now.

You’d need to create an ACF Card and assign your View. There are Sort and Filters available.

Please see our docs for more details.

Let me know if that helps.

So you are saying there is now way to show ACF custom fields inside a WP query loop? The funny thing is that it used to work awhile ago and I don’t know exactly when it stopped working. Maybe the recent update? I don’t know. I remember I had to add this line in the functions.php to make it work:

add_filter(‘acf/shortcode/allow_in_block_themes_outside_content’, ‘__return_true’);

I was looking at the ACF card, but is not what I’m looking for. I still want to use the default query loop and still be able to display the fields for each post. Is there a way of doing this with code? Thank you.

I’m sorry I was confusing you with the original ACF people. Thank you for your suggestion.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer