• Greetings, programs!

    I recently migrated a single WordPress install into multisite and for the most part, the transition was smooth. However, I have two sets of pages, listings posts in categories that are no longer working like they did before the migration.

    I have 3 category templates set up.

    category.php
    category-blog.php
    category-research-center.php

    This page should load category-blog.php : http://stoppredatorygambling.org/blog/category/blog/business-model/

    This page should load category-research-center.php: http://stoppredatorygambling.org/blog/category/research-center/addiction/

    But neither do as they’re supposed to. They’re both loading category.php

    Now, the weird thing is that http://stoppredatorygambling.org/blog/category/blog/ lists all pages in the “blog” category and should load category-blog.php and it does. On each of the pages I have listed above, the category list in the sidebar lists child categories of the top-level categories “research-center” and “blog” so it would appear that when you click on a child category of either page, the category template defaults to category.php instead of the template for its parent category.

    I’ve been struggling with this for a couple of days. I really need to get out from under this problem before I lost my mind.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    What happens if you use category-ID.php instead of the slug?

    Thread Starter TheBryanWhite

    (@thebryanwhite)

    Templates still don’t load.

    BUT!

    If I set the filename as something like category-75.php (the Addiction category – this also works if I change it to category-addiction.php) and then I click on Addiction, the proper template loads. So I have to be specific about the child category in order for the template to load. This, obviously, doesn’t meet my needs but I’m getting somewhere.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    That kind of makes sense actually… The category-slug.php format is always meant to be the last slug in the chain.

    Thread Starter TheBryanWhite

    (@thebryanwhite)

    Interesting. Is there a way to modify this behavior so that it loads the template by the parent category instead of looking for templates with the child category slug or ID?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Not that I’m aware of… But I don’t claim to be a theme expert. 🙂 You may want to post in that subforum?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Category templates not loading’ is closed to new replies.