wordpress - Query Loop Block with ACF Custom Fields - Stack Overflow

admin2025-04-18  0

I don't understand how to include custom fields in a Query Loop block. I created my custom field group and assigned it to 'posts'. I created a query loop to display all nodes of type post. Within the content blocks returned by the query loop I added shortcodes for the custom fields. Nothing is returned though unless I hardcode a post ID. Example:

[acf field="customfield"] returns nothing

[acf field="customfield" post_id="1"] returns the value for post 1.

Any ideas how to do this? In Drupal it would just be a View.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1744970789a277473.html

最新回复(0)