A standout amongst the most essential offering purposes of WordPress is topics. A solitary subject increases the value of the plan and usefulness of the site. In any case, there are sites that have distinctive plans on various pages.

Create a custom template

    • Login to your hosting panel
    • Go to your file location:wp-content/themes/your choosen theme like (twentysixteen)/create your template like homepage.php

    • Paste this code in to your text editor like notpad++ or sublime and save it homepage.php.

<?php /* Template Name: homepage */ ?> // write your template name here.

<?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(); ?>

    • Go to WordPress Admin Panel > Pages > Add New. You can see the new custom page template listed on the right side.

  • Click Update button. Your custom template will be created.

Like it? Share with your friends!

What's Your Reaction?

hate hate
0
hate
confused confused
0
confused
fail fail
0
fail
fun fun
0
fun
geeky geeky
0
geeky
love love
0
love
lol lol
0
lol
omg omg
0
omg
Anu Shukla

0 Comments

Your email address will not be published. Required fields are marked *

5 × four =

Choose A Format
Personality quiz
Series of questions that intends to reveal something about the personality
Trivia quiz
Series of questions with right and wrong answers that intends to check knowledge
Poll
Voting to make decisions or determine opinions
Story
Formatted Text with Embeds and Visuals
List
The Classic Internet Listicles
Countdown
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item
Meme
Upload your own images to make custom memes
Video
Youtube, Vimeo or Vine Embeds
Audio
Soundcloud or Mixcloud Embeds
Image
Photo or GIF
Gif
GIF format