我想在两个日期之间显示一个元字段,管理员可以通过自定义字段设置这两个日期。
如何在设置的日期之间显示此类内容?
ThanksMatt公司
我想在两个日期之间显示一个元字段,管理员可以通过自定义字段设置这两个日期。
如何在设置的日期之间显示此类内容?
ThanksMatt公司
<?php <br />
function filter_where($where = \'\') {<br/>
$where .= " AND post_date >= \'1980-05-11\' AND post_date <= \'2011-05-11\'";<br/ >
return $where;</br>
}<br/>
add_filter(\'posts_where\', \'filter_where\');<br/>
query_posts($query_string);<br/>
while (have_posts()) :<br/>
the_post();<br/>
the_content();<br/>
endwhile;<br/>
?>
获取元数据值并替换为数字日期。目的是确保在编辑帖子时,列出层次分类法的元盒不会在更新时重新排序,以将选中的项放在顶部。马上edit-form-advanced.php 呼叫add_meta_box(), 传递的回调post_categories_meta_box, 定义于meta-boxes.php.post_categories_meta_box() 调用wp_terms_checklist(), 离开checked_ontop 参数未定义。wp_terms_checklist() 该参数默认为true, 这是所有这些胡闹的根本原因