The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Show only sub-category (child) posts (1 post)

  1. kurtbogdon
    Posted 3 years ago #

    Hello. I'm trying to create a template that will show only the posts related to a sub-category. Here is an example:

    Category = Cars
    Sub-category = Buick
    Sub-category = Ford
    Sub-category = Jeep

    I would like to change the category.php file so that if I click on a link for "Jeep" I will only see the posts for "Jeep".

    I have tried many different variations on the_category, is_child_of_category, get_the-category, etc, and viewed all the relevant posts I could find, but nothing will work.

    What I have now just shows all the posts in the parent category.

    Many thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic