1

I'm using the twentyfourteen theme and have created a child theme with its own style.css. Now I'd like to create a custom page template. From all I've read the process seems to be:

  1. Make a copy of the existing page template, e.g., page.php, and place it still in the parent theme directory but give it a new name.
  2. Make the changes you want to this new template.
  3. Any elements you create can be given unique classes and then styled by the style.css in the child theme.

Does that sound right?

One question is, How is the new template assigned to the page? Do I have to manually go into the Page Attributes and select the new template, or will it get pulled automatically from the template hierarchy?

Thanks for your help.

1
  • check my answer for custom template Commented Jan 2, 2016 at 7:38

1 Answer 1

2

You have to choose in the Page Attributes section. Refer the below URL. https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/ http://www.smashingmagazine.com/2015/06/wordpress-custom-page-templates/

Custom page template

  1. page-{slug}.php
  2. page-{id}.php
  3. page.php
  4. index.php

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

I've read the Smashing article several times but he's not clear if the copy of the old template stays in the parent tree or is moved to the child tree. Also, what if your page uses several templates. Will the page keep using those if you select one template from Page Attributes?
yes all template will be available. only thing u need to clear cache and press CTRL + F5

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.