Php VisualComposer使用或运算符自定义查询

Php VisualComposer使用或运算符自定义查询,php,wordpress,visual-composer,Php,Wordpress,Visual Composer,我通过VisualComposer与Wordpress合作,并发布活动日历的结果网格。只要我只想从一个事件类别中提取,但需要从多个类别中提取,我就可以使用查询 我已经尝试了使用OR运算符的所有技巧,但无法使其起作用。我的代码可以从一个类别中提取: post_type=tribe_events&post_status=publish&_EventStartDate=>$today&orderby=_EventStartDate&order=asc&t

我通过VisualComposer与Wordpress合作,并发布活动日历的结果网格。只要我只想从一个事件类别中提取,但需要从多个类别中提取,我就可以使用查询

我已经尝试了使用OR运算符的所有技巧,但无法使其起作用。我的代码可以从一个类别中提取:

 post_type=tribe_events&post_status=publish&_EventStartDate=>$today&orderby=_EventStartDate&order=asc&tribe_events_cat=entertainment

我需要从娱乐和音乐会中获取结果。

我做了足够的挖掘和学习,以找出如何使用WP\u查询

https://developer.wordpress.org/reference/functions/query_posts/
以及如何通过http_build_查询解析内容

http://php.net/manual/en/function.http-build-query.php
以下是解决方案:

post_type=tribe_events&post_status=publish&_EventStartDate=>$today&orderby=_EventStartDate&order=asc&include_category=(concerts,entertainment)