WordPress.org

Ready to get started?Download WordPress

Forums

category-slug.php sub-category problem (1 post)

  1. bobby_baboon
    Member
    Posted 4 years ago #

    I'v created a theme file 'category-events.php' and its working great for listing all of the posts in the events category. But if I want to see a specific type of event (which is a sub-category) then WordPress defaults to my 'category.php'.

    For example:
    'siteurl.com/category/events' uses 'category-events.php'
    but
    'siteurl.com/category/events/music' uses 'category.php'

    Googling around I found some old solutions to similar problems dealing with using the category id, but I was wondering if there's anything better now that WordPress supports category slug template files.

Topic Closed

This topic has been closed to new replies.

About this Topic