Give WordPress custom page template a title for appearance editor

When in WordPress theme appearance editor, certain pages have a neat titles displayed in the right hand list for your theme files.For example page.php shows as “Page Template”. This is clean and easily read.

Is there any comment syntax that WordPress uses to give these titles for my custom page template?

Read More

For example, my single-video.php page could be “Video Page Template”.

Related posts

Leave a Reply

3 comments

  1. Yes you can. Make sure your page opens with something like:

    <?php /** Template Name: Text & Image 
    */ get_header(); ?>
    

    In this case the name of the file in your file overview (while in your appearance editor): Text & Image Page Template

  2. I don’t think so. The reason being that single-{type} pages are not essentially a required part of WordPress Template files, where as page.php is as it is used to for all static WordPress pages.

    So it makes sense that WordPress people set a neat title for page.php and left single-{type} pages unattended. Also, type of single-{type} pages are user defined and subject to variation; where as page.php templates are not.

    You may refer this page from WordPress Codex for more information

  3. Yes, you need to provide a proper formatted URL (permalink) to wordpress Like either you want a dash (-) OR Forward Slash (/) OR whatever you want.

    For this Go to Admin Panel > Appearance > Permalinks , here you can see the different styles of permalinks.You can create your own permalink structure too.

    Find the attachment for your help.

    enter image description here