WordPress.org

Ready to get started?Download WordPress

Forums

taxonomy.php template displaying top-level and second-level terms (3 posts)

  1. Henry
    Member
    Posted 2 years ago #

    Hi all,

    I am using a taxonomy.php to display a list of posts tagged with terms from a custom taxonomy.

    My custom taxonomy is called Sports. I have the following top-level terms: Tennis, Football, Basketball. I have the following second-level terms (parent term being Tennis): Wimbledon, US Open, French Open.

    i'd like the following to happen when taxonomy.php is displaying posts:

    1. example.com/sports/tennis

    Should display all posts tagged with the the top-level term Tennis.

    2. example.com/sports/tennis/wimbledon

    Should display all posts tagged with second-level term Wimbledon AND posts that are tagged with the top-level term Tennis only

  2. Henry
    Member
    Posted 2 years ago #

    Just to clarify point 2...

    example.com/sports/tennis/wimbledon

    Should display (all posts tagged with second-level term Wimbledon) AND (posts that are tagged with the top-level term Tennis only - i.e. have no second-level terms)

    Looking forward to your help!

  3. Henry
    Member
    Posted 2 years ago #

    Anyone have an idea how I could do this?

Topic Closed

This topic has been closed to new replies.

About this Topic