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

I don't understand how to include custom fields in a Query Loop block.I created my custom field

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744970787a4603952.html

相关推荐

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

    I don't understand how to include custom fields in a Query Loop block.I created my custom field

    1天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信