【发布时间】:2016-06-17 04:04:07
【问题描述】:
一直在阅读有关在 wordpress here 中查询 ACF 字段的信息,但遇到此问题:
$args = array(
'posts_per_page' => -1,
'post_type' => 'team_member',
'status' => 'publish',
'orderby' => 'title',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'patents',
'value' => array(''),
'compare' => 'NOT IN'
)
)
);
$the_query = new WP_Query($args);
基本上,只是尝试查询所有具有 ACF 中继器字段的帖子,称为 patents,其中至少有 1 项专利。如何做到这一点?
【问题讨论】:
标签: advanced-custom-fields wordpress