2016-06-28 78 views
0

我正在通过Visual Composer和来自事件日历的结果的帖子网格使用Wordpress。只要我只想从一个事件类别中抽取数据,我就可以使用查询,但我需要从多个类别中抽取数据。使用OR运算符的Visual Composer自定义查询

我已经尝试了使用OR操作符的所有技巧,无法使其工作。我有的代码从一个类别拉动:

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

我需要拉娱乐和音乐会的结果。

回答

0

我没有足够的挖掘&学习弄清楚如何使用WP_Query

https://developer.wordpress.org/reference/functions/query_posts/ 

,以及如何得到的东西通过解析http_build_query

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)