Create a custom template page


I would like to create a custom template page for one of my subpages.
I followed the wordpress codex and created a page-{slug}.php file. I can select this template on the Edit Page Site, however the template file is not used.
I think the page.php file of the saprkling theme is used instead. Is there a possibility to use custom template files in Sparkling?

P.S.: I already asked a similar question concerning the landing page and the solution was to delete front-page.php .


Front-page.php is active only when used on front page and it has nothing to do with page templates. You can see example how page templates should be used for page-fullwidth.php which comes with theme. You can use it as base file for your custom page template template.

The main things for page template to make them work are:

  1. Proper name for template file page-{slug}.php. For example you would like to use something like page-contacts.php for contact page.
  2. You must set name of this template. For example I have used it like this for full width template Template Name: Full-width(no sidebar) If name is not set then WordPress won’t recognize it.

Your description is perfectly right, it was my mistake,
I had the woocommerce plugin installed, and tried to edit one of this plugin’s predefined pages, which of course didn’t work as expected.

Thank you for the fast and great support =)