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
Add a comment  | 

1 Answer 1

Reset to default 0

Assuming 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