

It’s going into the same place we uploaded the first version of the file. Save the custom page template file and upload it again to the theme root directory. We’re cutting the section that starts with /* and ends with */ – it looks like this:Īfter the header is removed, our custom page template will look like this:
#CUSTOM NOTEPAD++ THEMES CODE#
Our custom page template already has a header, so we’re going to cut the header section out of the code we copied from page.php.

Now open it in your text or website editor.Ĭopy the contents of page.php and paste them into your custom template file. In the theme root directory, where we uploaded our custom theme file, look for the file called page.php.

We’ll use that as the basis of our custom template. We’re going to make things easier on ourselves by copying the existing theme page template. Add the code to our custom template to display the page contents.
#CUSTOM NOTEPAD++ THEMES HOW TO#
There’s no code in the template file to tell WordPress how to display the page. That’s because our template contains only the single line that identifies it. But when I view it on my website, it’s blank. I created and saved a new page using my custom template. Now when you create a new page or edit an existing page, your custom template is available. We’re going to use the FTP program again in a minute, so don’t close it yet. Now you see the MyPageTemplate.php file in the twentynineteen root directory. Upload your custom theme PHP file into the theme directory. In my case, that will be /twentynineteen. Now click into the root directory for the theme you’re using. In the /themes directory, you’ll see the currently installed WordPress themes. You can see the WordPress files and the three “wp-” directories. My WordPress installation is called “demo,” so my WordPress root directory looks like this: (You may also see directories referred to as folders.) We’re going to connect to our WordPress “root” directory. But in the long run, a stand-alone FTP program will be quicker and more efficient.
#CUSTOM NOTEPAD++ THEMES WINDOWS#
You can also FTP files from the Windows File Explorer or the cPanel File Manager for your hosting account. If you don’t already use an FTP program, try FileZilla. Now we’re going to upload the file to our WordPress website, so you’ll need an FTP program. Leave the page you just created open in your editor. So in my case, I would save the file as MyPageTemplate.php. To keep things organized, give the file the same name as the template name you used. Just make sure it’s something you’ll recognize later. The code tells WordPress that it’s a template and will be displayed as MyPageTemplate. In a blank page, enter this line of code: < ?php /* Template Name: MyPageTemplate */ ?> Your editor interface is likely to look slightly different. But any text or website editor (DreamWeaver, CoffeCup, Notepad++, Atom Text, TextPad, etc.) will do the job.įor this tutorial, I’m using the Sublime editor. If you’re a Windows user, the Notepad text editor is already there on your computer. To create the custom template, we’ll use a text editor. Look at it like a page that behaves independently from the rest of your WordPress website. Anything you change on the custom page will not affect the rest of your site’s layout. You can set up the page in any number of ways without having a negative impact on the rest of your website. That can be done for marketing purposes or to create a page that is unrelated to your overall site theme. What a Custom Page Can Do For YouĪ custom page template can be useful when you need to create a separate look and feel from your primary website. Just follow the steps here, and by the end of the article, your custom template will be up and running. (Customizing the template will also involve working with CSS, PHP, and some HTML.)īut even if you don’t have everyday experience coding, you can create a template in WordPress. We’ll work with PHP and FTP, so some basic knowledge of coding and uploading site files is helpful. But once you’ve created the template, it’s just a click away in WordPress whenever you need it. It’s not as easy as installing a plugin – it requires a bit of hands-on work. You can create pages with your own design and layout using a custom page template in WordPress. For instance, many sites have a landing page that looks much different than the rest of the site. But there may be times when you’d like to create a page with a different look and feel. WordPress uses templates and themes to guide the layout of the website.
