Support » Themes and Templates » Need help listing custom post type sub categories when viewing a parent category

  • Right, so I’m trying to do the following, though failing miserably…

    I have a custom post type along with taxonomies/categories. My taxonomy template file works fine for showing the posts within each category, though i’d like to do something a little more advanced than this.

    I’m looking to output all sub categories, when viewing a parent category, along with the thumbnail for the latest featured image in each sub category, as well as the permalink to each sub category and, obviously, the title of the category.

    These sub categories should only show when you’re viewing a parent category. When viewing the sub categories I’d like it to display as I currently have it, with thumbnails of the featured image from each post.

    So basically:
    Viewing parent category: List Sub Categories, Latest Featured Image (maybe even random), permalink to each sub category and the sub category title.
    Viewing sub Category: Keep as I currently have it. Showing Post Titles and Featured Images.

    Only really need help with the parent category part. Surely it can’t be that difficult to just output a list of the viewed parent category’s children, right? Remember, this all applies to a custom post type/taxonomy setup, not regular posts.

  • The topic ‘Need help listing custom post type sub categories when viewing a parent category’ is closed to new replies.