我有Elliot Condon的高级自定义字段4.3.7和WebDevStudios的自定义Post Type UI版本0.8.2。com“插入”,并希望仅将插入限制为这两个。
我有多个ACF用于date\\u one、date\\u two、date\\u three,。。。最多20个(不太可能有任何事件超过10个,但只是以防万一),并且是Y-m-d PHP格式。
Goal: All event lists will be chronologically ordered by their NEXT event date and will only be a single line of information with only one date (the NEXT event date).
我从以下内容开始,只是想了解今天的活动,但似乎无法做到这一点,它也没有解决明天活动的问题。 <?php query_posts(array(
\'meta_query\' => array(
\'relation\' => \'OR\',
array(
\'key\' => \'date_one\',
\'value\' => date( \'Y-m-d\' ),
\'compare\' => \'=\',
\'type\' => \'DATE\'
),
array(
\'key\' => \'date_two\',
\'value\' => date( \'Y-m-d\' ),
\'compare\' => \'=\',
\'type\' => \'DATE\'
),
array(
...
),
),
\'posts_per_page\' => 30,
\'post_type\' => \'performances\'
) ); ?>
最终,我有一个后备方案,只涉及开始和结束日期,但我真的希望有这个特殊的功能。