skip to Main Content

i want to integrate several layouts into my theme. so far I have solved it via page.php and page-blue.php because I saw it that way in tutorials. unfortunately the other template is not displayed under the page attributes. i don’t see the error. even if i choose a different theme the attributes do not appear. what am I doing wrong?

it should look like this

it should look like this

this is how it looks

this is how it looks

this is the page.php

this is the page.php

this is the page-blue.php

this is the page-blue.php

2

Answers


  1. Change the name of the template, page is reserved word, also create brand-new file with file name other than page.php, which is also reserved file name.
    And, for god’s sake, name your template files in a way they mean something, self-explanatory.

    Example for dummies:

    <?php
    /*
    * Template Name: Some Template
    */
    

    And the file name of the template should be some-template.php inside your theme’s folder!

    Read more

    Login or Signup to reply.
  2. pls Use This code

    <?php
    /*
    * Template Name: page-blue
    * Template Post Type: post
    */
    get_header();
    ?>
    

    instead of this

    <?php
    /*
    * Template Name: page-blue
    */
    get_header();
    ?>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search