How Do I Create a Custom Post Template in WordPress?

In order to create a custom post template in WordPress, you will first need to create a new folder within your WordPress site’s root directory and name it “templates.” Within this new templates folder, create a new file titled “post-template.

php.” Within this new post-template.php file, you will need to include the following code:.

‘mytemplate’, // The name of your custom post type. ‘name’ => ‘My Custom Post Type’, // The name of your post. );.

Next, you will need to create a file within your custom post type’s directory named “mytemplate.php.

” Within this new mytemplate.

.

Finally, you will need to create a file named “footer-meta.php” within your custom post type’s directory and include the following code:

‘ . __( ‘My Custom Post Type’ , ‘mytemplate’ ) . ‘

‘ ; // Show the post’s date.

echo ‘

‘ ; echo date_format( ‘Y-m-d’ , get_the_time()) . ‘

‘ ; // Show the post’s time. echo ‘

‘ ; echo.