Adding a Template to the Page Attributes Panel for both Posts and Pages?

Question

I would like to keep my main theme as the active theme, but allow users to select a slightly different layout via the “Page/Post Attributes” panel. Ideally, I’d like to store this layout under my main theme’s “styles” directory, in its own folder.

MyTheme > styles > My-special-Layout > style.css

So that in the “Page Attributes” panel, I see a template there called “My-special-layout”

However, I have two issues…

  1. I can’t seem to get the “child” theme to appear in the “Page Attributes” panel.
    (I’m simply adding a folder under my main theme directory and placing a style.css file there that has the value “Template: my_main_theme_directory“). But I never see any templates appear in the “page attributes” panel.

  2. I can’t get the “Page Attributes” panel on the POST editor. I’d like to allow the template to be applied to Posts as well as Pages. How to get this panel on the post editor?

0
Scott B 4 months 0 Answers 14 views 0

Leave an answer