A beginners’ guide to creating WordPress Custom page templates

WordPress is a leading CMS platform. It is said to be the foundation of about 25% websites across the web. The simple and easy user interface is increasing its demand day by day. Whether it’s a small business, a professional, or a blogger, everyone is choosing WordPress for building a website.

There are many reasons that a webmaster selects WordPress. One of the core reasons is the abundance of themes, plug-ins, and useful tools. A vast community of designers and developers keep adding impressive tools to the official marketplace. You can advance functionality of your website with lots of free and premium plugins.

WordPress is also highly praised for bringing the functionality of an entire eCommerce website with the help of a plugin. It allows you to turn a simple WordPress website or a blog into an online shop, where you can display items for sale and configure a complete payment system.

The WordPress eCommerce platform is packed with all the necessary options a webshop may need, whereas merchants can further customize it to their varying business needs. For example, an online store that sells products according to its measurement units. With a simple installation of tools like WooCommerce price calculator plugin, they can setup cost per measuring units like carpet cost per square foot, paint and emulsion cost per liter, etc. every business is unique to other in terms of model and supplies that’s why they need to add varying options for the ease of customers.

The creation of custom page template is also a way forward to creating a comfortable user experience for the end users. This post will narrate the process of how you can add a custom page without seeking assistance from an individual expert or web development agency.

What a Custom Page actually means?

WordPress is an open source content management system that allows you to create web pages and posts. The user interface is quite user-friendly. You install a theme that implements a common design and layout to every page you create. So, whenever you try to add a page to your website, it is a copy of the same design. When you need to create a page different than the others, it is called a custom page.

What may you need a custom page template?

Every WordPress theme is a defined pattern of color combination, layout, and appearance. Any page that you create is a copy of a predefined pattern. So, what would you do if you have to create a landing page for a product that needs to be distinct than others? If you try to modify the core page design file that is page.php, it will affect the entire pages of your website. So, it is better to custom create a page that is isolated and different, and do not affect the rest of the pages.

Following is the easiest method to create a WordPress custom page template, whereas you may need a bit of understanding about CSS, HTML, and PHP.

Creating a Custom Page Template in WordPress

Step 1: Download one of the freely available code editors like sublime text, atom, notepad++, etc. Install and open the editor, and copy the following code.


The code is helpful in making the WordPress understand that you are creating a new template with the name of CustomPageTemplate1. You can replace template name with anything that suits your website.

The moment you add the code to the editor, save the file with a PHP extension. Like write any file name, but it has to end with .php. Proceed to create a custom page template in WordPress by logging into your web hosting account and navigating to the ‘file manager’. Click the directory file and find the theme in use. Upload the file you have created with the .php extension right into the theme.


Once you upload the file, the database will update and an additional template option will appear in the pages section of your WordPress admin panel. Look into the page attributes block, click the templates drop down menu, and you will see the addition of a custom template you have just uploaded to the theme.

Editing the custom page template

As you have uploaded a template with a single line code, you may find the template page empty. You can customize the template by adding HTML or PHP code to the file.

One of the easiest methods for customizing a page is to start with the code provided by your theme development company. Most of the themes are open source, so you can copy an existing code and try personalizing the appearance.

Go back to the hosting account of your website and click ‘file manager.’ navigate to the content directory and download page.php file. Copy the code from the file excluding the header content and paste it into the custom page template.


Save the file in your computer device and upload it again to the theme folder you had done previously. Now, as your custom page has a proper code, it will look exactly the same as other pages of your website display.

Add or embed any kind of content to the custom page directly from your WordPress admin panel. It gives you a complete freedom of customizing a page without disturbing the rest of the pages on your website.

Final thoughts

Once you are successful in creating a custom page, you can personalize it further with the addition of blocks, sliders, and tables. As a beginner, you can seek assistance from developers’ community and forums, whereas code variation is available for adding a component to a web page. You can start learning by copying and understanding the available code and coming up with your unique creation. As you will be customizing a page that is separate from the theme, you have the freedom to commit mistakes and learn from it. Because any code error is not going to affect the rest of your website.

Author bio:

Khawar Abbas is an experienced internet marketing expert with industry exposure of more than 5 years. Currently, he is working for Extendons, where he is looking for web ranking and content marketing campaigns for different products that primarily include themes, plugins, and extensions. Among all his successful campaigns, WooCommerce Product Addons is worth mentioning that is helping merchants to create additional custom options on product pages.

WordPress is the undisputed king of Content Management Systems as it holds the center stage in everything related to websites and SEO. From creating websites to enriching content and publishing content in the most attractive manner, WordPress has so much to offer that making a comprehensive list of its offerings can be very difficult.  It has now almost become a norm to create websites using WordPress themes. Every day some new themes appear in the long list of themes that rule the world of web design and web development. It often happens that you might think about changing the current theme of your website as some new theme has caught your fancy. The task is not difficult, but you must consider the impact it might have on SEO before deciding to switch over to a new WordPress theme.  Read on to know more about how a change of WordPress themes affects SEO.

Why change themes?

Changing website themes is mostly prevalent among bloggers most of who start with free WordPress themes, and once they learn the ropes and traffic keep increasing,  they prefer to switch over to a new theme. Since most of the free themes have built in SEO features duly optimized, it provides bloggers an immediate start to their SEO campaign.  Websites created with free WordPress themes are vulnerable to hackers, which is another reason for changing the theme. However, the primary reason for moving over to a new theme is to increase traffic flow to the website.

WordPress themes and SEO

If you are currently using a WordPress theme and want to change it with a new one, you must first know whether the existing theme has built in SEO options that you have been using or were you using separate plugins for SEO. Many websites prefer built in SEO features with the theme, as you have to use one less plugin. If you are using a theme with in-built SEO features, then changing over to a new theme can affect the SEO campaign that you have initiated.  In case the theme does not have in-built SEO infrastructure, and you are using an SEO WordPress plugin then changing the website theme would not affect SEO, but you must ensure that the new WordPress theme is optimized for local SEO Gilbert AZ. However, some other issues would come up when you change the WordPress theme.

It affects heading tags

When you switch over from one WordPress theme to another, there are chances that the SEO campaign is affected. Suppose you are using hyperlinked post titles or you might even use H2 tags for post titles. In such cases, changing the theme would inevitably impact SEO. To avoid such problems, use SEO optimized themes as it uses proper heading tags, the codes are clean, and it meets all other requirements of SEO.

 URLs will change

The most notable change that you will see when you change themes is that the website URL changes. The URL is most important for your online identity because viewers recognize your site by looking at the URL. It is more than a mere address; it is the face of your website. Since search engines rank websites by considering the URL, it is evident that when you change the theme, it changes the URL and as a result, it affects the SEO ranks that you had earned.  Therefore, to retain the SEO benefits, you must ensure that the website URL remains the same after changing the theme or there must be some arrangement of redirecting viewers and search engines to the right page.

You lose the custom settings

When using a WordPress theme, you would usually prefer some specific settings that make you feel comfortable as you are very convenient with it. The setting becomes a part of the theme feature. However, when you change the theme and choose a new one, you must be ready to give up the earlier custom setting that will no more be available.  To get back those settings, either the new theme must have provisions for it, or you need to take help from a WordPress developer to get it done for you.  While selecting a WordPress theme, pay attention to the manner in which the website loads content because it relates to site speed that Google considers an important factor in search rankings.  Some themes load the content first and then the other elements of the website whereas some other themes load everything together. If the site speed is slow, then the search rankings take a beating.

To retain the search rankings when changing WordPress themes, you must take a backup of the theme and the database and then use an SEO plugin to store the data. Some WordPress SEO plugins have the facility of data migration built into it that helps to import all data to the plugin quickly.

About the author: Isabella Scott has a degree in management and a decade’s experience in online marketing.  She is quite familiar with local SEO Gilbert AZ, and she is greatly attracted to writing on various SEO topics.  Although she never wanted to be a marketer, it was a chance meeting with her mentor that changed her career.