Now we will see how to create a custom single post template.
There are several ways to create Custom Single Post Template in WordPress. But in this article we will see how to create one in manually.
In your wordpress theme you have the default temple for the single post name single.php. But you may need different templates for your specific post. If you want to add a different layout to a post then you have to use this wp custom post template.
Here we are not going to discuss the custom post. We are going to apply different templates to the standard or default post found in WordPress.
First you need to create a php file inside your theme and name it tutorial-single-post.php.
You can add the following code to getting started.
<?php /* * Template Name: WordPress * Template Post Type: post, page, product */
Once you create the WordPress post template you can assign this template to select post in your WP admin
To assign a templete, first you have to create or edit post then you will see the Meta Box right side of your post editor
Then select the name of the template which you have created