admin管理员组文章数量:1432213
I created a custom post status and I would like to set auto-change (clients are filling two dates, precomming and ongoing).
How can I do auto-post-status change when it is after precomming or ongoing date?
I'm also trying to do my own post listing filter: When I'm filtering by custom field it's all good, but I can't filter by taxonomy called job_listing_category
.
If guests select art category then show just art category posts:
$cat = get_terms('job_listing_category');
$cat_array = array();
foreach($cat as $cat){
if($value == $cat->slug) {
$cat_array[] = $cat->slug;
}
}
$meta_query = array(
'tax_query' => array(
'taxonomy' => 'job_listing_category',
'field' => 'slug',
'terms' => $cat_array
)
);
But idk know why it's not working (even my $cat_array
is not null, I get art cat there).
本文标签: wp queryWordPress poststatus and metaquery
版权声明:本文标题:wp query - WordPress post_status and meta_query 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745561430a2663493.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论