Forums

[resolved] Changing hierarchy: Display subcategories using parent category page (3 posts)

  1. lilalfyalien
    Member
    Posted 1 year ago #

    Hi,

    I am developing a theme. I have the following scenario:

    I have the following category "parent", within this category there are numerous other "children" subcategories, which may grow / change in time.

    At present, I have:

    Category.php
    Category-otherparent.php
    Category-parent.php

    with the url: http://mywordpresssite/wordpress/category/parent, my Category-parent.php is hit but http://mywordpresssite/wordpress/category/parent/children goes to Category.php.

    How to I get it to go to Category-parent.php? Is there a hook where I can tell it to look at the parent Category too before defaulting to the standard Category.php page?

    Thanks,

    Lilalfyalien

  2. lilalfyalien
    Member
    Posted 1 year ago #

    I found a plugin: http://wordpress.org/extend/plugins/elevate-parent-category-template/

    Sod's law that as soon as I post, I find something...

  3. lilalfyalien
    Member
    Posted 1 year ago #

    I also see that from reading his/ her code, s/he hooks into 'template_redirect'.

Topic Closed

This topic has been closed to new replies.

About this Topic