I don’t want to edit the template files – I’d like to make a new template file. I’m looking in the MySQL registry, but all I see is a table for posts, not pages. Someone mentioned the editor earlier, but that doesn’t help with creating new templates.
I think I create a php file in my content>theme>my_theme directory, but I’m not certain.
Thanks for any help.
This should help you out:
It shows you which pages map to which template, and how new templates should be created. As an example, if you created an About Us page (singular, static page with the default page template), here’s what WordPress checks for:
page-about-us.php
?page-#.php
(where#
is the pageid)page.php
In your case, if you want to edit a single page (it’s a page right, not post?) .. then simply creating a file called
page-$slug.php
would be sufficient .. WP will use that “template” when rendering that page.If it’s still a bit unclear, check out the source link here (it makes things crystal clear!): http://make.wordpress.org/docs/theme-developer-handbook/part-one-theme-basics/template-hierarchy/
You can create your own template files in your theme directory, or a subfolder. Use a comment on top that has the name of the template.
You can assign the template to a page under the “Page Attributes” box in the dashboard.
Of course you need more than just that comment to display anything in your template. You might stay by copying the content of your theme’s index.php, then edit from there.