首页 文章

Visual Composer:将数据源缩小为具有Category1和Category2的帖子

提问于
浏览
0

我正在尝试将WP Visual Composer中的数据源缩小到 posts that have 2 categories (cat1 and cat2) .

这是完整的元素(帖子网格):

[vc_basic_grid post_type="post" max_items="-1" element_width="2" gap="20" item="masonryGrid_Default" grid_id="vc_gid:1531579131384-317a2fc3-f3e3-3" taxonomies="7, 4" el_class="relatedMedals"]

我的主题界面没有选项可以排除类别,也无法定义属于多个的帖子 .

Is there anything I can write here that would filter posts so that only those containing BOTH categories show?

从:

taxonomies="7, 4"

至:

taxonomies="(ONLY ITEMS WITH BOTH) 7 (AND) 4"

1 回答

  • 0

    为了防止这对任何人有帮助,我最终使用了 custom query (而非邮件分类法),它支持多个类别:

    category__and%5B20%5D=12&category__and%5B21%5D=4&post_status=publish
    

    每个类别是:

    category__and%5B20%5D=12
    

相关问题