Looking for a easy way to create pages in WHMCS? We can recommend the WHMCS Pages module by No Half Pixels. We’ve tested it with all templates and it works flawlessly. - Click here to purchase.
In this tutorial I’m going to show you how to create custom pages in WHMCS. This guide will focus on our professional WHMCS themes but should work with any WHMCS installation/theme/template.
1) Create the .php page
This page will have all of the functionality required to load the page and assign it the above page title. Luckily this code is provided by WHMCS, however I have simplified their example as much as I could.
Create a new .php file in the root of WHMCS. I always recommend using the page title without spaces and capitations, in this case it will be windows-hosting.php. This file needs to contain the following code:
Note the Windows Hosting, windows-hosting.php and windows-hosting references. These should be changed based on the page you'd like to create.
1) Create the .tpl file
This last file is where you’ll need to add your content for this particular custom page. It needs to be named exactly in line 35 of the above code but with the .tpl extension. So in this case it is windows-hosting.tpl. This file needs to be created in the following directory:
As a example add the following basic content to this file:
All of our WHMCS templates also come with ready-made code which you can paste in your custom page to instantly display pricing tables and feature boxes.
Viewing the new file
The new file will now be viewable at:
Leave a comment
Let us know what you think!