WordPress 3.0.1 使用自定义分类查询自定义帖子类型
我有一个具有多种分类类型的自定义帖子类型。问题仅集中在其中之一。 我需要显示所有已检查特色供应商分类的自定义帖子。目前,只有一个“特色”,但将来可能会有更多,例如“亮点”或“赞助商”或仅这些台词。 但是,现在,我只需要浏览所有“供应商”自定义帖子类型,找到在“特色供应商”分类法中选中“特色”的帖子类型。
我有一些帖子说这是不可能的,但它们要么是从 2.8 开始,要么是从今年第一年开始,我知道 WordPress 从那时起至少发布了一个更新。
提前致谢!!
I have a custom post type with multiple taxonomy types. The issue is focused around just one of them.
I need to display all custom posts that have a taxonomy from featured-vendors checked. Right now, there is just one "featured" , but there may be more in the future, such as "highlight" or "sponsor" or something alone those lines.
But, for now, I just need to go through all the "vendors" custom post type, find ones with "featured" checked inside of the "featured-vendors" taxonomy.
I have some some posts out there that state it's not possible, but they were either from 2.8 or from the very first of this year and I know WordPress has released at least one update since then.
Thanks in advance!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
按分类术语查询自定义帖子类型
此示例将假设:
自定义帖子类型已使用分类注册,并且分类已使用
'query_var' =>true
和'hierarchial 注册'=>正确
“选中”的术语将是父级,任何新术语都可以稍后作为子级添加。
代码:
Query Custom Post Types by Taxonomy Term
This sample will assume:
the custom post type was registered with the taxonomy and the taxonomy was registerd with
'query_var' =>true
and'hierarchial' => true
The "checked" term will be the parent and any new ones can be added later on as children.
The Code: