Support » Fixing WordPress » Page Attribute and theme file errors.

  • tomadamsphotography

    (@tomadamsphotography)


    Hello all,

    My first post to the forum so excuse me if I’ve misplaced myself.

    I’m in need of a little help with my page attributes when it comes to editing ‘Pages’. My attributes have doubled in the drop-down (Page attributes -> Template) menu but also don’t update when new page templates are created even though it’s visible in the webspace physically but not through the WordPress webspace viewer.

    It’s a theme I’ve designed and was fine up until recently, I’m wondering if I need to change my file structure or if the page headers (see below) have changed and I’m not aware.

    <?php 
    /**
    * Template Name: Featured
    **/
    get_header(); ?>

    Any help would be great,

    thanks all.

Viewing 1 replies (of 1 total)
  • The rules haven’t changed recently, but the option to specify post types that the template is for was added some time back.
    You didn’t specify how you named the files or where you put them.
    The name should not start with ‘page-‘, because that is specify to the slug of a Page.
    The templates should be in the root folder of the theme or one level under the root. WP only looks one level down.
    Also, if you are using a child theme, page templates with the same file name as the parent override (child version shown in list), but different file names and same template name will show both in the list.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.