0

I am developing a child theme and have created a custom template for "category/ archives" page for a specific category

However, For some reason this custom template has become the default template and is now being used instead of the parent's custom and default templates for ANY and every post/ page rather than for archive. It is even being used for the front page template!.

So my questions are...

  1. Why is the childtheme/category-{category}.html template being used as the default template regardless if the current page is a "post" or "page" or even "front page"?
  2. How do I revert the default theme to be the parent theme's template(s)
  3. How do you create editable templates for "specific" "posts" or "pages" without overriding non-related templates ???
1
  • 1
    1. It would be helpful to see a screen shot of your Admin > Settings > Reading settings to see how things are set for Your homepage displays. 2. A screen shot of your files in the child theme /templates folder would also be helpful. 3. Use higher priority template file names in the Template Hierarchy for posts and pages.
    – kofeigen
    Dec 3, 2023 at 14:04

1 Answer 1

0

Turns out i had to hook in using "single_template" to add my theme file to the top of the stack.

e.g.

add_filter('single_template',.....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.