admin管理员组文章数量:1404578
hoping one of you wizards can help me with this one. I'm fairly new to this. Here's the situation - I have a custom post type called 'Videos' where I set up a Custom Taxonomy called 'Country List'. I want to create a page like this that shows all the custom category titles and their featured images. I've no idea where to start.
Any help would be greatly appreciated.
hoping one of you wizards can help me with this one. I'm fairly new to this. Here's the situation - I have a custom post type called 'Videos' where I set up a Custom Taxonomy called 'Country List'. I want to create a page like this https://www.vagabrothers/destinations that shows all the custom category titles and their featured images. I've no idea where to start.
Any help would be greatly appreciated.
Share Improve this question asked Jan 14, 2020 at 2:43 user6880554user6880554 1 1- Welcome to WPSE. The WordPress theme developer handbook is a good place to start. Especially the Loop (developer.wordpress/themes/basics/the-loop) and the template files sections (developer.wordpress/themes/template-files-section) – Antti Koskinen Commented Jan 15, 2020 at 9:55
1 Answer
Reset to default 0Assuming the name of your custom post type is "videos", you can create a new template file in the themes directory called taxonomy-videos.php
. If your custom post type's permalinks are set up correctly this template will be rendered anytime the main query returns 'videos', so at 'http://www.yoursite/videos'.
In the template file you can start a loop and cycle through each post returned from the DB.
本文标签: categoriesI want to create a custom taxonomy page showing a list of subcategories
版权声明:本文标题:categories - I want to create a custom taxonomy page showing a list of subcategories 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744832329a2627422.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论