Title: Query Loop
Last modified: July 6, 2023

---

# Query Loop

 *  Resolved [Carl](https://wordpress.org/support/users/carlbtmn/)
 * (@carlbtmn)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/query-loop-2/)
 * Can I display a custom field on a query loop? The issue I have is that it shows
   the same value for all of the post. For some reason is not picking up the ID.
   Any ideas?

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [WPLake](https://wordpress.org/support/users/wplakeorg/)
 * (@wplakeorg)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16876067)
 * Hi [@carlbtmn](https://wordpress.org/support/users/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 2 years, 11 months ago by [WPLake](https://wordpress.org/support/users/wplakeorg/).
    -  This reply was modified 2 years, 11 months ago by [WPLake](https://wordpress.org/support/users/wplakeorg/).
      Reason: Clarity
 *  Thread Starter [Carl](https://wordpress.org/support/users/carlbtmn/)
 * (@carlbtmn)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16876086)
 * 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?
 *  Thread Starter [Carl](https://wordpress.org/support/users/carlbtmn/)
 * (@carlbtmn)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16876089)
 * ![](https://imgtr.ee/image/wh9VU)
 * Screenshot of the list view:
   [https://imgtr.ee/image/wh9VU](https://imgtr.ee/image/wh9VU)
 *  Plugin Author [WPLake](https://wordpress.org/support/users/wplakeorg/)
 * (@wplakeorg)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16876095)
 * 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](https://docs.acfviews.com/guides/acf-cards/basic/creating-an-acf-card)
   for more details.
 * Let me know if that helps.
 *  Thread Starter [Carl](https://wordpress.org/support/users/carlbtmn/)
 * (@carlbtmn)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16876113)
 * 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’);
 *  Thread Starter [Carl](https://wordpress.org/support/users/carlbtmn/)
 * (@carlbtmn)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16876168)
 * 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.
 *  Thread Starter [Carl](https://wordpress.org/support/users/carlbtmn/)
 * (@carlbtmn)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16876235)
 * I’m sorry I was confusing you with the original ACF people. Thank you for your
   suggestion.
 *  Plugin Author [WPLake](https://wordpress.org/support/users/wplakeorg/)
 * (@wplakeorg)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16877627)
 * Not a problem [@carlbtmn](https://wordpress.org/support/users/carlbtmn/)
 *  [KeanuTang](https://wordpress.org/support/users/tedtang/)
 * (@tedtang)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16954494)
 * Did you get this resolved? Are you using the Gutenberg block editor? You could
   try this plugin:
 * [https://wordpress.org/plugins/display-a-meta-field-as-block/](https://wordpress.org/plugins/display-a-meta-field-as-block/)
 * If you need to use a shortcode, I ran into this issue and put together this plugin.
   You only need the build folder and .php file to get it running. [KeanuTang/query-loop-shortcode: WordPress Plugin for Gutenberg Shortcode Block to Work Within Query Loops (github.com)](https://github.com/KeanuTang/query-loop-shortcode)
 *  Plugin Author [WPLake](https://wordpress.org/support/users/wplakeorg/)
 * (@wplakeorg)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16989487)
 * [@carlbtmn](https://wordpress.org/support/users/carlbtmn/) If you’re looking 
   for a no-coding option. ACF Views is the easy way to display ACF fields in the
   WP Query Loop.
 *  Thread Starter [Carl](https://wordpress.org/support/users/carlbtmn/)
 * (@carlbtmn)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16992270)
 * [@tedtang](https://wordpress.org/support/users/tedtang/) I did ended up using
   this plugin (Meta Field Block) when I had the issue. Works pretty well… I just
   wanted a solution without a plugin. Yours looks interesting… not sure how it 
   works.
   Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Query Loop’ is closed to new replies.

 * ![](https://ps.w.org/acf-views/assets/icon-256x256.gif?rev=3022872)
 * [Advanced Views - Display Custom Fields (ACF, Pods, MetaBox), Posts, CPT and Woo Products anywhere in Gutenberg, Elementor, Divi, Beaver...](https://wordpress.org/plugins/acf-views/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/acf-views/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/acf-views/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-views/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-views/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-views/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [Carl](https://wordpress.org/support/users/carlbtmn/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/query-loop-2/#post-16992270)
 * Status: resolved