How To Create Template In WordPress

Step 1:

To create template is just different layout structure from other pages 
in your website.
Create new php file copy from page.php in your theme
its content should like this

Here , page.php  (its default Template displaying all pages)

* Template name: abc           //add this line in your top of file
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that
* other 'pages' on your WordPress site will use a different template.
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0

get_header(); ?>

<div id="main-content" class="main-content">

if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
// Include the featured content template.
get_template_part( 'featured-content' );
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">

// Start the Loop.
while ( have_posts() ) : the_post();

// Include the page content template.
get_template_part( 'content', 'page' );

// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {

</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->


Step 2:

In Admin
Create cms page and select template name...

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s