Free Online Courses for Software Developers - MrBool
× Please, log in to give us a feedback. Click here to login

You must be logged to download. Click here to login


MrBool is totally free and you can help us to help the Developers Community around the world

Yes, I'd like to help the MrBool and the Developers Community before download

No, I'd like to download without make the donation


MrBool is totally free and you can help us to help the Developers Community around the world

Yes, I'd like to help the MrBool and the Developers Community before download

No, I'd like to download without make the donation

Wordpress templates: Customizing your own theme

We all know that WordPress is a very popular Content Management System. In this article we will discuss about the template modification part of WordPress.

Now a day’s one part is very popular in our software development world and that is Content Management System (CMS). Basically it is one of the most important concepts of template design pattern. At first we have to know about TEMPLATE. Template is nothing but a theme that we use in our development platform with the defined process. It gives us lot of advantages that we set as a theme for one time and use it more and more in future as our developing platform. This process is possible by the use of Content Management System like WordPress.

The WordPress documentation is used to develop different types of templates. Using this we can easily build the best and also most easy-to-use WordPress themes on the world. Every template that we are generating are very easy and also different types of supporting tools are available that allows us to make it individually with our own model.

So after you’ve done some of these quick details, it has a look and feel that reflects you and your businesses’ distinct personality. But until now, we’ve never done a tutorial (that I know of) to really show off some simple ways you can customize your site. The Web site pages are one of WordPress's built-in Post types systems. We are possibly wanted to generate our most popular website Pages to look about the identical. When we require a specific Page or a group of Pages that is displayed or behaved differently we need to follow the procedure via Page Templates.

Procedure to Choosing a Page Template:

Normally our Theme files that we should include with default page template process are page.php. Our Theme can develop one or more custom page templates according to our urgent jobs that display content in broader columns. Otherwise we may have to create our own custom template as our choice and also set it with proper position.

Items Application
Edit Page Screen We can assign a custom template for any individual Page by using the Template dropdown in the Edit Page screen (part of the Page Attributes module)
All Pages Screen The Quick-Edit and Bulk Edit options on All the Pages screen also have Template dropdowns.

Table 1: Showing different screens

The Edit Page Screen also has first part to use for Selecting a Template from the list as like a Test Custom Page. After that click on the Update button for updating our site as it also displayed the preview result.

Minimum Condition of Template List Will Show:

  • Generally at least one custom page template files present in our active Theme's folder. If we want to change our Theme, after the page template is created then the formerly activated Theme will not display in the site.
  • You are viewing a screen for editing a Page: page templates are not a default option for posts or custom post types.

Process to create a good Page Template in WordPress:

WordPress offers different ways to display Pages. All types of system which is involved for editing, otherwise adding files in our active Theme's folder i.e. necessary. When our active theme is not one then we have to design the page template totally ourselves.

When we use the child theme to make the changes. Otherwise the changes will be overwritten when the theme is updated to a new version.

Concept of the Conditional Tags:

Edit your default template: Generally we can frequently make smaller Page-specific to those changes with Conditional Tags in our Theme's page.php file. In the system programming, it loads one header file with name of Admission.php. When we set our front page otherwise another page line Contact Us page with the name of the file is contact.php and the default header.php is used for all other Pages:

Listing 1: Sample showing different parts of the page

if ( is_front_page() ) 
    get_header( 'Admission' );
elseif ( is_page( 'Contact Us' ) ) 
    get_header( 'contact' );

Processing to Specialized Page Template:

Create a template for one Page: Generally some wide-ranging changes which are to intend for just one specific Page and also we can fashion a dedicated template file that are very much powerful for all circumstances. The name of the page like that Page's slug or ID:

  1. page-{slug}.php
  2. page-{ID}.php

Now We will discuss with standard illustration that our Contact us page has a slug of 'contact' and an ID of 6. Now we set an active Theme's folder which has a file named page-contact.php or page-6.php. Through this procedure WordPress will robotically search and use that file to purify the Contact Us page.

This point should be remembered that dedicated page templates must be in our active Theme's folder like following way: /wp-content/themes/Test-theme/

A dedicated page template file cannot be present in a sub-folder.

Processing to generate Custom Page Template:

Create a template that can be used by any Page: A Custom Page Template can be used by multiple Pages as like Selecting a Page Template above. At the same time of the creation of a custom page, templates make a new file which is starting with a Template Name inside a PHP comment. Now we write the syntax is given below.

Listing 2: Showing template

Template Name: Test Custom Page

When we upload our file to our Theme's folder then we find out that template name, "Test Custom Page”. A swift and very secure process for making a new Page template is to use with a replica of our page.php[.php is the extension of php file]. Through this way we start off with the Hypertext Markup Language construction of our other pages and we also need to edit those pages. A custom page template file can be in a sub-folder otherwise it may be use a Child Theme. It may be use its Parent Theme's folder as required.

Filenames: The Name of our template file that we can easily identify is its Template Name, e.g., filename Test-custom-page.php for template name "Test Custom Page". Some programmer groups their templates with a filename prefix like as page_Test-custom-page.php

File Folders: When we have to use a custom page template file that must be stored in our active Theme's folder, otherwise its Parent Theme's folder or may be a sub-folder within either WordPress finds custom page templates in all these location: the location is given bellow :

  • /wp-content/themes/Test-theme/
  • /wp-content/themes/Test-theme/Test-templates
  • /wp-content/themes/Test-child-theme
  • /wp-content/themes/Test-child-theme/Test-templates
  • /wp-content/themes/Test-parent-theme
  • /wp-content/themes/my-parent-theme/my-templates

At the time of file as recognized for a custom page template, it must be started with the string "Template Name:" in a comment. After that we can add other information, like a sample code is given below:

Listing 3: Sample code for PHP page

/* Template Name: Test Custom Page
 * Description: A Page Template with a darker design. */
// Code to display Page goes here...
/* Template Name: Test Customize Page

The ’Templates Tag article defines many built-in WordPress theme. The Template functions can be used for our different webpage‘s display process.

Editing a Page Template


When we wish to change our own template as our choice then we have to follow some process. The processes are given below.

At first login the WordPress site with admin link and click on Appearance Dashboard -> through this Appearance Dashboard we go to Themes option that themes support to us for editing existing template in the WordPress.

Showing dashboard

Figure 1: Showing dashboard

Then we go to customize option.

Next step is that we select different types of properties that properties is that select Site Title like CEI that will be display at the top of the page. In the picture we can set it easily with proper way.

Showing custom option

Figure 2: Showing custom option

When this process is completed we are going to Color option. This color option is very important for developing the site because if we wish delightful site then it is most important job for us to develop this page attractive and looking well.

Showing color position

Figure 3: Showing color position

When color position is set then we go to Header Image option. This header image option is one of the most important parts. In that system we select different types of pattern that pattern is set at the top of the website as the website is like more wonderful and also it is more standardized form. Using the arrow sign we give us pint that is generating the theme.

Showing header image

Figure 4: Showing header image

When the system is generated, we are going to Navigation option though the navigation window is not required for developing the page. So we can easily avoid this process.

Another important point is very helpful for us that are Static font page. This static font page is having two radio buttons that are [1. Your latest post 2. Static Page]

After that when all circumstance is fulfilled then we click on save button and close option.

Showing save option

Figure 5: Showing save option


WordPress Template is one of the most important design component in the Webpage design world. Because using the template base process we can set different themes that are supporting more than one page at a time of web site creation. We know that WordPress is the most popular Content Management System, so knowing template is very much important.

Hope you have enjoyed the article and use it effectively to make beautiful WordPress websites. Keep on reading.

Website: Have 16 years of experience as a technical architect and software consultant in enterprise application and product development. Have interest in new technology and innovation area along with technical...

What did you think of this post?
To have full access to this post (or download the associated files) you must have MrBool Credits.

  See the prices for this post in Mr.Bool Credits System below:

Individually – in this case the price for this post is US$ 0,00 (Buy it now)
in this case you will buy only this video by paying the full price with no discount.

Package of 10 credits - in this case the price for this post is US$ 0,00
This subscription is ideal if you want to download few videos. In this plan you will receive a discount of 50% in each video. Subscribe for this package!

Package of 50 credits – in this case the price for this post is US$ 0,00
This subscription is ideal if you want to download several videos. In this plan you will receive a discount of 83% in each video. Subscribe for this package!

> More info about MrBool Credits
You must be logged to download.

Click here to login