admin管理员组文章数量:1418096
I have a custom post type called ring_advantage
.
I have a custom taxonomy on ring_advantage
, called issue_RingAdvantage
I have a custom taxonomy on ring_advantage
called topic
I write an article under ring_advantage
, pick an issue from issue_RingAdvantage
, and pick a topic
.
On the front-end, the user can land on a page that displays the information about issue_RingAdvantage
(title, image, etc). On that same page, I want to display all articles that match the currently viewed issue_RingAdvantage
AND the topic
of the ring_advantage
article.
I have the following query which successfully pulls in the articles attached to issue_RingAdvantage
, but doesn't show the topics of the articles:
$current = get_terms(
array(
'taxonomy' => 'issue_RingAdvantage',
'hide_empty' => false,
'orderby' => 'ID',
'order' => 'DESC',
'number' => 1
)
);
$args = array(
'post_type' => 'ring_advantage',
'tax_query' => array(
array(
'taxonomy' => 'issue_RingAdvantage',
'field' => 'slug',
'terms' => $current[0]->slug,
),
),
);
How can I implement a query that ALSO gets the topic associated with ring_advantage
?
本文标签: functionsQuery taxonomy of taxonomy of custom post type
版权声明:本文标题:functions - Query taxonomy of taxonomy of custom post type 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745254724a2650030.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论