How to Create a Custom Page in WordPress

Do you need to create a customized web page in WordPress? You would possibly understand that many WordPress websites have other layouts for various pages. A customized web page permits you to have other format in look from common pages in WordPress. In this newsletter, we can display you the way to create a customized web page in WordPress.

What is a Custom Page in WordPress

By default WordPress permits you to create posts and pages. Your WordPress theme controls the semblance of your pages by using a template document known as web page.php.

This template document impacts all unmarried pages that you just create in WordPress. However, now not all pages are the similar. Little adjustments in their format and look can cause them to distinctive and a lot extra helpful.

Creating a customized web page template in WordPress calls for a elementary figuring out of HTML, CSS, and PHP.

Having stated that, let’s leap into developing your first customized web page in WordPress.

Video Tutorial

If you don’t just like the video or want extra directions, then proceed studying.

Creating a Custom Page in WordPress

First, you wish to have to open a simple textual content editor like Notepad to your pc. In the clean document upload this line of code on the best:

<?php /* Template Name: CustomPageT1 */ ?>

This code merely tells WordPress that that is a template document and it must be identified as CustomPageT1. You can identify your template the rest you need so long as it is smart to you.

Once you may have added the code, save the document to your desktop as, custompaget1.php.

You can save the document with any identify, simply make certain that it ends with .php extension.

For this subsequent step, you are going to want to attach to your site the use of an FTP shopper.

Once hooked up, pass to your present theme or kid theme folder. You will to find it in /wp-content/topics/ listing. Next, add your customized web page template document to your theme.

Now you wish to have to login to your WordPress admin subject to create a new web page or edit an present one.

On the web page modifying display screen, scroll down to ‘Page Attributes’ phase, and you are going to to find a template drop down menu. Clicking on it’ll permit you to choose the template you simply created.

Selecting your custom page template

Now for those who exchange template and consult with this web page, then you are going to get to see a clean web page. That’s as a result of your template is empty and does now not inform WordPress what to show.

Don’t fear, we can display you the way to simply edit your customized web page template.

Editing Your Custom Page Template

Your customized web page template is like some other theme document in WordPress. You can upload any HTML, template tags, or PHP code in this document.

The best approach to get began together with your customized web page is by way of copying the present web page template supplied by way of your theme.

Open your FTP shopper and pass to your theme folder. There you are going to to find a document known as web page.php. You want to obtain this document to your pc.

Downloading page template file

Open the web page.php document in a simple textual content editor like Notepad, and replica all its content material apart from the header section.

Template header of a typical page.php file in a WordPress theme

The header section is the commented out section on the best of the document. We don’t seem to be copying it, as a result of our customized web page template already has one.

Now you wish to have to open your customized web page template document and paste it on the finish.

Your customized web page document would now glance one thing like this:

<?php /* Template Name: CustomPageT1 */ ?>

<?php get_header(); ?>

<div identification="number one" magnificence="content-area">
	<leading identification="leading" magnificence="site-main" function="leading">
		// Start the loop.
		whilst ( have_posts() ) : the_post();

			// Include the web page content material template.
			get_template_part( 'template-parts/content material', 'web page' );

			// If feedback are open or we've got no less than one remark, load up the remark template.
			if ( comments_open() || get_comments_number() ) {

			// End of the loop.

	</leading><!-- .site-main -->

	<?php get_sidebar( 'content-bottom' ); ?>

</div><!-- .content-area -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Save your customized web page template document and add it again to your theme folder the use of FTP.

You can now consult with the web page you created the use of customized web page template. It will now glance precisely like your different pages in WordPress.

You can now proceed modifying your customized web page template document. You can customise it in any approach you need. For instance, you’ll be able to take away the sidebar, upload customized PHP code, upload some other HTML you need.

You can upload the content material by way of modifying the web page in WordPress web page editor display screen. You too can go away the content material subject in web page editor totally empty, and upload customized content material without delay in your web page template.

We hope this newsletter helped you upload a customized web page in WordPress. You might also need to see our listing of the most productive drag and drop web page builder plugins for WordPress.

If you really liked this newsletter, then please subscribe to our YouTube Channel for WordPress video tutorials. You too can to find us on Twitter and Facebook.

Recent Articles

How To Set Different Wallpapers On Multiple Screens On MAC

Does this question pop in your head when you think of setting up multiple screens on MAC? If so, the next few...

5 Must-Have Android Apps for 2020

The digitization of most of the amenities of society was a breakaway from the traditional livelihood of the masses.

How To Rearrange Comments in WordPress

Rearranging feedback to show the newest one on most sensible is changing into a brand new development that an increasing number of most sensible...

How to Highlight Author’s Comments in WordPress

On maximum websites, it is rather arduous for customers to observe creator’s feedback. This is why many WordPress websites spotlight their creator’s remark by...

How to Add Categories and Subcategories to WordPress

WordPress comes with the facility to kind your content material into classes, tags, and taxonomies. One of the most important distinction between classes and...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here