WordPress Website Templates

Find Professional WordPress themes Easy and Simple to Setup

inner banner

Add new page template

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2708
    developer1
    Participant

    Hello,

    I’d like to create a new template (like “no-sidebar.php”). I already created the PHP file.
    Where do I have to register it so it will show up in my template options when creating or editing a page?

    Best regards,
    Phillip

    #2713
    Grace Themes
    Member

    Hi Phillip

    For creating the new template file you need to add template name

    In No Sidebar template file at the very top you will find

    /*
    Template Name: No Sidebar
    */

    If you want to create new template file just copy the no-sidebar.php file, rename it and change the ‘Template Name’ then it will display in template options.

    Regards
    Grace Themes

    #4584
    Sanya Kaushal
    Participant

    Simply open any text editor and paste the following code in it.

    <?php /* Template Name: PageWithoutSidebar */ ?>

    The above line of code tells WordPress that it is a template file called PageWithoutSidebar. You can use any name you want. Now save this file as PageWithoutSidebar.php. Again you can use any other name for the file. But don’t forget to keep the extension as .php

    Sanya K
    CMx Contract management software

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.