📜  acf wp_query 自定义字段 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:31.695000             🧑  作者: Mango

代码示例1
// WPQuery using ACF basic fields
$args = array( 
    'post_type'   => 'post',
    'posts_per_page' => '20',
    'meta_key'        => 'color',
    'meta_value'    => 'blue' // Can be string or true/false
);
$posts = new WP_Query( $args );