开发者

Wordpress Templates aren't showing up on my Page Options

I'm working on my first WordPress project. It won't be a blog but a CMS to quickly edit content and pages on the site.

I've got the header and footer exactly how I want it by editing them in the Appearance -> Editor menu. Under this menu I see quite a few templates that I could use (screen shot http://i.stack.imgur.com/P7IyY.png), some of which I don't even think I'll need or know where they came from. However when I edit my pages and go to the Page Attributes section there is only an option for 1 template (screenshot http://i.stack.imgur.com/UblzD.png). If I select Default Template as my template for the page, only the header and footer seem to load.

I am pretty new to WordPress. Am I suppose to 'activate' these templates somewhere? I only plan to use a handful of them (index pages, contact pages with a sidebar). What am I m开发者_运维问答issing?

Thank you!


You should take a look at the information posted in the WordPress Codex on template files and the like. This image is particularly helpful in getting an understanding for when certain files are used by the WordPress engine to render pages WordPress Template Files Diagram.

You'll find the rest of the information relating to that diagram on this page.


I experienced this issue when using a child theme. I added a new template file to the child theme but the "templates" dropdown did not show on the page options section of any of my pages. I checked and double-checked the formatting of the template file and that was not the issue.

It turns out that my styles.css document in the child theme was not formatted properly and was missing the "template" attribute that designates the parent theme being extended with the child theme. I update the child theme css document to reference the parent template and voila! The template dropdown showed as expected.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜