Do you want to create a custom page in WordPress?
A custom page lets you use a different layout from your regular pages in WordPress. Many WordPress sites have custom page layouts for their sales pages, landing pages, webinar pages, and more.
In this article, we will show you how to easily create a custom page in WordPress, step by step.
Understanding Custom Pages in WordPress
By default WordPress allows you to create posts and pages.
Your WordPress theme controls the appearance of your pages using a template file called page.php
.
This template file affects all single pages that you create in WordPress.
However, as you already know that not all pages are the same. For instance, you may want to create a landing page that looks quite different from your regular website pages.
In the past, creating a custom page in WordPress meant coding your own custom template using HTML, CSS, and PHP. We will cover that method, but we do not recommend it for beginners.
Instead, we suggest using SeedProd or another page builder plugin to create your custom page. Simply use these quick links to jump straight to the different methods.
- Using SeedProd to Create a Custom Page in WordPress (Recommended)
- Using Beaver Builder to Create a Custom Page in WordPress
- Manually Creating a Custom Page Template in WordPress
Using SeedProd to Create a Custom Page in WordPress
SeedProd is the best drag and drop page builder for WordPress. It comes with 100+ professionally designed templates that you can use as the basis for your page.
Alternatively, you can create a completely custom WordPress page without writing any code using their drag & drop builder.
SeedProd is designed to be easy to use, even for total beginners. However, it also has advanced options that let you build visually stunning pages to engage your visitors and increase conversions.
First, you need to install and activate the SeedProd plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Note: there’s a free version of SeedProd plugin available as well. However for our example, we’ll be using the Pro version since it has many powerful features.
Upon activation, you should see the welcome page. You need to enter your license key here and click the ‘Verify key’ button. You will find your license key in your account area on the SeedProd website.
Next, go to SeedProd » Pages in your WordPress admin. Then, simply click the ‘Create New Landing Page’ button.
Next, you will be prompted to choose a template. You can filter these to find templates for the type of page you are creating. If you prefer to start from scratch, then simply use the blank template.
For the sake of this tutorial, we’re going to use a ‘Course Sales Page’ template.
You will be prompted to give your page a name and set the URL. After doing so, go ahead and click the ‘Save and Start Editing the Page’ button.
The template you chose will now load up in the SeedProd page builder.
To change anything in the template, simply click on it. It’s easy to change text directly in the page builder itself. For instance, here we are editing the page headline.
You can format your text, change the alignment, add links, and more.
It’s also easy to edit images using the SeedProd page builder. Simply click on the image that you want to change.
In this example, we have replaced the default image at the top of the page with our own image.
Go ahead and change anything you want by simply clicking on it. This will open the editing pane on the left hand side of the page.
To add new blocks (elements) to your page, simply click on the Design tab at the top of the page. Just choose any Standard or Advanced block and simply drag and drop it into place on your page.
After adding a block, you just need to click on it to edit it. Here, we’ve added a list block to our page.
If you make a mistake at any point or change your mind, don’t worry. Simply click the ‘Undo’ button at the bottom of the page to reverse what you did.
You will also find the redo button, revision history, layout navigation, mobile preview, and global settings for your page here.
Once you are happy with your custom page, it’s time to preview or publish it. To publish the page, first click the dropdown arrow next to the Save button at the top of the screen. Then, select the Publish option.
You will see a message letting you know that your page has been published. To check it out straight away, simply click the ‘See Live Page’ button.
To edit your custom page at any point in the future, simply go to SeedProd » Pages in your WordPress admin.
You should see your saved page in the list of landing pages. Simply click on the title to edit it.
The benefit of using SeedProd over any other page builder in WordPress is that it will not slow down your site. SeedProd is the fastest page builder, and it lets you create completely custom page layouts that are independent of your theme design, so you can have custom header, footer, etc.
Using Beaver Builder to Create a Custom Page in WordPress
Beaver Builder is a popular and well-established drag and drop page builder for WordPress.
You can use it to easily create custom pages on your website or blog. We recommend using the full version of Beaver Builder. There’s also a free version of Beaver Builder available with limited features.
First, you need to install and activate the Beaver Builder plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, you will see the Beaver Builder welcome screen. Simply click on the License tab to enter your license key. You will find this in your account area on the Beaver Builder website.
Don’t forget to click the ‘Save License Key’ button to save your license key.
To use Beaver Builder, simply go to Pages » Add New in your WordPress admin to create a new page. Then, click the ‘Launch Beaver Builder’ button.
The Beaver Builder editor will then open up. You need to add rows and modules to create your page. Simply click on the element you want to use, and drag it onto your page.
Alternatively, you can start with a template. Go ahead and click the Templates tab, then choose a template to use.
You can then click on any part of the template to change it. For instance, you can change the text, images, colors, and more.
Here, we’re editing the heading of the page. Beaver Builder’s editing process isn’t quite so smooth as SeedProd’s, as you need to type the text into a separate popup box.
Once you’ve finished making changes to your page, simply click the Done button on the top right. You will then be able to save or publish your post.
Creating a Custom Page Template Manually
If you prefer not to use a plugin, you can create a custom page template manually in WordPress.
Editor’s note: It’s completely fine to have many plugins running on your WordPress site. Take a look at our post on how many WordPress plugins you should install if you are worried about having too many plugins.
First, you need to open a plain text editor like Notepad on your computer. In the blank file, add this line of code at the top:
<?php /* Template Name: CustomPageT1 */ ?>
This code simply tells WordPress that this is a template file, and it should be recognized as CustomPageT1. You can name your template anything you want as long as it makes sense to you.
Once you have added the code, save the file to your desktop as, custompaget1.php
.
Go ahead and save the file with any name, just make sure that it ends with the .php
extension.
For this next step, you will need to connect to your WordPress hosting account using an FTP client.
Once connected, go to your current theme or child theme folder. You will find it in the /wp-content/themes/
directory. Next, upload your custom page template file to your theme.
Now you need to login to your WordPress admin area to create a new page or edit an existing one.
On the page editing screen, scroll down to the ‘Page Attributes’ section. You will see a Template dropdown menu. Clicking on it will allow you to select the template you just created.
If you select your new template and visit this page on your site right now, then you will see a blank page. That’s because your template is empty and does not tell WordPress what to display.
Don’t worry, we will show you how to easily edit your custom page template.
Editing Your Custom Page Template
Your custom page template is like any other theme file in WordPress. You can add any HTML, template tags, or PHP code in this file.
The easiest way to get started with your custom page is by copying the existing page template provided by your theme.
Open your FTP client and go to your theme folder. There you will find a file called page.php
. You need to download this file to your computer.
Open the page.php file in a plain text editor like Notepad, and copy all its content except the header part.
The header part is the commented out part at the top of the file. We are not copying it, because our custom page template already has one.
Now you need to open your custom page template file and paste all the code you have copied at the end.
Your custom page file would now look something like this:
<?php /* Template Name: CustomPageT1 */ ?> <?php get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php // Start the loop. while ( have_posts() ) : the_post(); // Include the page content template. get_template_part( 'template-parts/content', 'page' ); // If comments are open or we have at least one comment, load up the comment template. if ( comments_open() || get_comments_number() ) { comments_template(); } // End of the loop. endwhile; ?> </main><!-- .site-main --> <?php get_sidebar( 'content-bottom' ); ?> </div><!-- .content-area --> <?php get_sidebar(); ?> <?php get_footer(); ?>
Simply save your custom page template file and upload it back to your theme folder using FTP.
You can now visit the page you created using the custom page template. It should look exactly like your other pages in WordPress.
Next, continue editing your custom page template file. You can customize it in any way you want. For example, you can remove the sidebar by removing the line that starts <?php get_sidebar
.
You can also add custom PHP code or add any other HTML you want.
To add the actual content for your page, just edit the page as normal in WordPress.
You could also leave the content area in the page editor completely empty, and add custom content directly to your page template. That way, the content you add will appear on all pages using the custom template.
We hope this article helped you add a custom page in WordPress. You may also want to see our guide on the most important types of WordPress pages that every website should have, and our list of the must have WordPress plugins for all websites.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Dear WPB Team,
I created the template named MyTemplate.php and copied it into /wp-content/themes/ directory. The template is not reflected in drop down menu of Page Attribute -> Templets. Please guide.
Is it necessary to use FTP server for this? Please guide.
Thanks.
NG SHAIKH
Kudos to WPBeginner Team. This is an excellent article which can give guidance to a beginner from the scratch. What a help!
However, if there is further guidance as to how to remove sidebar, create and add custom sidebar and where to put PHP code or HTML.
With lot of regards and love,
NG SHAIKH
Hi great tutorial!
One question… I am adding new HTML template files that use css and js files etc. How can I link these files in my template file? I added the files to the same directory as the other stylesheets and assets but no luck. They do not render on the new template page. Any ideas?
Thanks!
Im confused.. i hink this site has written years ago, but if i do understand it, you cannot do custom pages anymore in wordpress unless you have some sort of subscription?
i was trying to “edit” my wordpress site but all feature was missing.
Thanks – once again – how to remove header/footer/sidebar?
Thanks
Remove get_sidebar(), get_footer(), and get_header().
This will break all the styling because your stylesheet won’t load. So you need to make sure that wp_head() and wp_footer() are added in your template.
Fore more customization help, you may want to look here:
https://codex.wordpress.org/Theme_Development
thanks great help
Thanks for this tutorial,this tutorial help me to understand the concept easily.Good Work keep continuing like this.
-Deepan
Thank you for this tutorial. I use cPanel to add the customPage.php onto wp-content/.. and it works. Without using FTP.
Thanks for the great article. Tried the steps and it works perfect. Seems like the file ‘CustomPageT1.php’ has to always be uploaded into the active theme folder or if working offline with wamp save it in wamp/www/wordpress/wp-content/themes/active theme.
Great Article. Exactly what I was looking for. Keep up the good work pal!
This article, pure and simple, works like charm to me!!!
So it works perfectly bur when I put the file in a plugin file (because it make more sense) it doesn’t work. Do you have anyidea on what to do to make it work.
Thanks anyway for all your great tutorial
Great work, guys. Thank you very much. But one question please… How do i make this custom template pull posts from one particular category or categories? I’ve been building websites with wordpress for a while now but, this one seems knotty to me. I know there’s a plugin that does this, but I’ll rather go with the custom template method. Thanks, again…
hey guys, is their a plugin you recommend for WP that creates great looking pages like this:
You know, the pages that have the arrows pointing to things and almost a hand drawn look about the page.
Thanks…
Sir my websites homepage is in the form of custom link in wordpress menu and is not present in all pages also.I am a totaly newbie in website development so kindly help to convet this custom link into a page.
2:kindly also help to remove read more from posts.
Thanks
Irfan
website Address:www.fishysms.com
Does this tutorial still apply to the newest wordpress?
Also will it keep any of the attributes of the theme you are using?
Yes, it applies on latest WordPress and will keep all attributes of the theme you are using.
Please give details more and write it easily with screenshot. new word-press user cant understand your reading tutorial.
Thanks for your feedback. Please let us know which part you did not understand and we will try to explain it.
I didn’t understand this part…
Once you have completed editing this file save it and upload it in your theme directory (/wp-content/themes/yourthemedirectory/) where files like single.php and index.php are located.
How does one upload to one’s theme directory? (I have a wordpress.com site; does this have anything to do with this?)
Yes, you cannot upload files on WordPress.com sites. Please take a look at our guide on the difference between WordPress.com and Self hosted WordPress.org sites.
Hi,
where do we find the pages that were created with the add-new page link in wordpress.could someone help me out to figure out the pages.Thanks in advance
go to appearance -> editor -> then you can see page templete or page.php
oops. please ignore previous note.
Thank you for these instructions.
I have followed all your instructions, I believe correctly. However when I go to my WP editor to add content to this new template, nothing shows up on the page. It remains as a completely blank page.
how to create a simple template in wordpress
Thank you for this. I followed all the instructions. I have a blank template now. But when I go to my wp editor to add content, the content doesn’t appear in the new page.
Hey plz upload snap shot..
How can I change the url ?
I mean instead of “blog/?page_id=2” , I want it to be “blog/about” .
Thanks in advance
Check out our guide on how to create SEO friendly URL Structure in WordPress.
Checkout Permalinks at the very beginning of the page.
hallo, thanks for the post on creating a custom template, its helped greatly. But i have some issues i need answers to, this is my first time at wordpress and on the site i’m creating, i already have a custom template as the home page and then i have another page (with the theme’s initial homepage look, which is a custom page). the challenge i’m having now is : i want the custom template page i designed to load first but the theme’s custom page keeps coming up instead. i figured there’s some sort of conflict going on since they both have thesame url …so, preeeetyyy please, how do i get through this huge problem…thanks
Seems like you resolved your problem. In this case, you could have specifically told WordPress to use a template for a specific page. For example if you wanted to create a custom template for http://www.example.com/home-2 then you name your template file to be page-home-2.php. You can also use a page’s id in the template, like page-33.php will only work on page with 33 as the unique id.
Hi! I have always coded my webpages from scratch but now I need to add one to a wordpress website. I mean I have good html/css and this kind of stuff but little of wordpress.
I have followed the instructions and succesfully uploaded the file. The problem is that it is not listed on the template dropdown. I am not sure whether this happens because the file I created is not valid or any other problem. My file is composed of your header
and then following it a normal webpage (opening with etc…) without any styles now external files (just to check it out).
What am I doing wrong? any help would be appreciated.
Thanks you are my last resort!
Pol, we can provide you some tips to troubleshoot.
Please study the file page.php in your theme’s directory. Your custom page template should follow the same structure as page.php except the header part where you need to insert your own template name so that it can distinguished.
Make sure that you have uploaded your template to the right directory. It should be in /wp-content/themes/your-theme-name/ folder.
Let us know if this helped.
I have a problem with this.when i add new page there is no option of template in page attributes. I’m using wordpress 3.8.1
And also what is the name given to the page we are newly creating
This is Great! BUT HELP!
I created a template that pulls in a form, I currently have it with a Captcha but want to remove the captcha and use WordPress’ password protect functionality for this page so I can speedup multiple form entries.
The issue is that WordPress displays the template’s content before entering the password.
Your help would be greatly appreciated.
ReNet, thats because the password protect functionality implements password on the contents of the post/page that is protected not on your template. So the form you want to hide should be executed inside the post. You can create a shortcode for that and add it to your post/page.
Thanks for this – who knew it could be so simple!
Ok so I think Im missing a step or two…
1) I opened up a blank text document, copied this “1” into the first line of the notepad
2) Saved it to my desktop and loaded it into the proper wp-admin//themes/mythemedirectory/
3) Got it to show up on wordpress. Then I copied and pasted my html code for my splash page that I created in dreamweaver into the text(html) portion on wordpress.
4) Saved it as a draft and when I previewed it I get a bunch of strange text.
Can you explain to me what steps am I forgetting or missing. I think its something with the other php markups? or maybe where I post my html code. Im looking to have splash page without any menus or anything else besides my splash page coding. Any help or assistance would be greatly appreciated. The information you provided has gotten me farther then any of the other blogs Ive looked at so thank you very much!
It seems like you are trying to design a page in Dreamweaver and trying to import it in WordPress. This will not work. Because your page already has a structure and style defined by your WordPress theme.
thanks for the reply. Can I just take the html body from dreamweaver and paste it into the theme?
No it will still have the similar effect.
You can do that but try pasting the code in notepad first and then copying it again to WordPress. This usually eliminates some unwanted things like DOM.
I have one question please……………. help me. I want to store marks of student in Mysql database and once user go to the result page he has to enter his roll no and class, then he see his result. I have done this project but I really don’t know how to go through it in wordpress i.e where to write html and php coding in wordpress.
I am using WordPress.org on my localhost.
For that you will have to create your own custom solution using Custom Post Types, Custom Fields, and User Meta Data. If you look around you might find some WordPress plugin that already does all that.
Thanks for the post – this was exactly what I was looking for, and so helpful!
Thank you sooooo much for this tutorial. solved a big headache for me! Keep up the good work!
This page is fantastic! Thank you! I was messing around a little (a lot) with plugins when I did a search, came across this page, and figured this is way better than the other methods I was looking at to do something.
One thing is that in the article, it isn’t immediately obvious that the code should be put on the page before being uploaded. I mistook it as inputting the code on the ‘add a new page’ text box. Second time I tried it, I stuck the code in the text file (also, it isn’t obvious that they should choose all files, and change the text file extension to .php), and it worked like a charm. You can even add blog1 / blog2 / etc… to get multiple themes up there if you so need.
Thank you!
THANK YOU SO MUCH!!!!!!!!!!!!!!!!!!!!!!!!!! I have been trying to figure this out for 3 months now, came across your tutorial up and running with my new page template in 5 minutes.. I completely
understand some of the comments above, as when you are first starting out everything is so confusing. But when you get a grasp of things it is so easy. AGAIN YOU ARE A LIFE SAVER,SCHOLAR,AND A GENTLEMAN !!!! : )
This is suppose to be for beginners? I can’t even pass the first step “You can start out by calling WordPress header and footer”
what does it mean? whoever wrote this article has forgotten that is writing for beginners who tend to be clueless.
I tried to call header and footer but nobody answer, maybe i got the wrong number.
A screen shot will be quite useful.
I think you misunderstood the site. WPBeginner caters for beginners of all level. This article is in the Themes category, and this is for beginner theme designers. The article clearly says that you need to have HTML / CSS knowledge before you can do this.
We do have a beginners guide category – https://www.wpbeginner.com/category/beginners-guide/
Instead of being really sarcastic, sending 2 separate emails and leaving a comment, you should consider being more polite. We do not get paid to write these tutorials. It is a kind gesture for the community, and many folks have learned from our site. It would be one thing to be pissed off, if you paid for something, and you didn’t receive it. This site is entirely FREE. We try to help as many folks as we can without charging a dime.
-Syed
Founder of WPBeginner
thaaaaannnksssssssss im a front end developer and i consider myself a wp beginner i found this article really helpful
I’ve tried this and it worked like a charm, but the there’s one problem. The Posts didnt show, only the sidebar. what could be the problem?
Thanks,
Markus
That means that there is something wrong with the code in your template.
I tried this too and like above only the sidebar shows. What could be wrong with the code in my template?
Try copying the WordPress hook ( if statement) from the page.php file. Then paste it into the new file.
Thanks for this tutorial.
I’m trying to do this in order to create the author page (https://www.wpbeginner.com/wp-tutorials/how-to-display-an-author-list-with-avatars-in-wordpress-contributors-page/).
I’m using a child theme. Does this file get added to the main theme file directory or the child theme?
I just tried it in the main theme and it finally showed. So I’m assuming the answer is ‘main theme’ and that I haven’t broken it
No this file has to be added in the child theme directory. While it would work in the main genesis folder, it is best practice to never modify anything in the parent theme.
ah – thanks — that was my original presumption, but it didn’t show the template as an option for the page, so I second-guessed myself. I obviously didn’t add it correctly then, so off to try again!
WITHLOVEASH31 posted a question on 10/24/2011. Could one of the Editor’s please respond. I’d really like to know. I could really use this feature. Thanks in advance!
We didn’t reply because they also commented right after that they figured it out. You have to use FTP to login and upload a new theme file.
Completely newbie here. I was fine right up until you got to “begin creating a custom page by opening a blank file in your text editor”. Um, yeah…. Would that be the “editor” link under “Appearances” within my site? How do I “open” this? My purpose to have a page with all my blog posts on one page. My theme does not do this. Thanks!
Hey Jackie,
Yes this article does require prior HTML/CSS knowledge. Text Editor can be Notepad, Dreamweaver, Notepad++ etc.
this is the first help page that’s helped me without creating another set of problems.
It worked! I never built a php page before and I pasted everything in exactly
Thank you!
“Since you have already written down all the text and settings in the php file, simply name the page and leave the content area blank”
How to do that ? My WP does not allow me to leave the content blank, it requires to type something on title before it lets create/edit page name, then if I type something, name the page and remove the text leaving it blank and publish it publishes whatever I typed on title before I removed the text…any advice ? Thanks,
Taika
Oh never mind. I figured it out
I was following your guide and everything went well until this- “upload it in your theme directory (/wp-content/themes/yourthemedirectory/) where files like single.phpand index.php are located.” This might stupid but how do i upload the file to my theme directory? I did find a page under the name “Editor” where single.php, index.php etc are located, i just don’t know how to upload the file i created. Please help :S
Excellent! I thought this would be a hard process. You explained it simply. I still need to work out a few things with how my theme displays the custom template, but now I’ve learned something new. Thank you!
Really awesome, exactly what i was looking for. Thanks
great post. This information was just what I was looking for. It took me about 40 minutes but I built a ‘squeeze’ page just like I wanted.
I still need to do some of the header work but is minor in my opinion.
Thanks
Brilliant!
How to create a custom page in WordPress and put it how default?
https://www.wpbeginner.com/wp-themes/how-to-create-a-custom-homepage-in-wordpress/
Use the page link above.
freakin phantastic blog! This may be the best project site on the web…
Hey, I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog!…..I”ll be checking in on a regularly now….Keep up the good work!
– Marc Shaw
Hi,
I’m on here now trying to do this. Let me see if I can pull it off.
Excellent tutorial. cheers guys.
Momo