wp query - WordPress post_status and meta_query

I created a custom post status and I would like to set auto-change (clients are filling two dates, precomming and ongoin

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).

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745561431a4633127.html

相关推荐

  • wp query - WordPress post_status and meta_query

    I created a custom post status and I would like to set auto-change (clients are filling two dates, precomming and ongoin

    16小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信