admin管理员组文章数量:1429060
Is there a way to add a layer to the terms to be able to only retrieve the terms based on a category?
I have terms attached to multiple different categories, but a lot less in individual categories.
$terms = get_terms( 'vehicles', array(
'orderby' => 'name',
'child_of' => $term_id,
'hide_empty' => $hide_empty
));
Is there a way to also add in the category? Example "Accessories" to filter yet again?
EDIT:
Illustrating my needs a bit more:
So i need to get the Vehicle taxonomies, there's a vehicles attached to ALL the categories shown, however I want to get all the taxonomies (vehicles) only inside the accessories, and if i choose a vehicle Make, i need to receive the children of that vehicle make taxonomy but still filtered by the category id (Accessories, 14901)
Does this make more sense?
本文标签: categoriesRestrict retrieved terms by category
版权声明:本文标题:categories - Restrict retrieved terms by category? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745540188a2662456.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论