xxxxxxxxxx
<?php
/**
* Template Name: Custom Template
*/
?>
Create Custom Template for WordPress page
xxxxxxxxxx
<?php
/**
* Template Name: Name_of_template_goes_here
*/
?>
<?php get_header(); ?>
// Code Goes here...
<?php get_footer(); ?>
Create a php file in your theme folder and add the above to your file and give it an appropriate name.
xxxxxxxxxx
<?php /* Template Name: Name of template */ ?>
// OR
<?php
/**
* Template Name: Name of template
*
* @package WordPress
* @subpackage Twenty_Twenty
* @since Twenty Twenty 1.0
*/
xxxxxxxxxx
<?php
/*
Template Name: Custom Template
*/
get_header(); // Include the header.php file
if (have_posts()) {
while (have_posts()) {
the_post(); // Set up the current post
// Display post content
the_content();
// Custom template code goes here
}
}
get_footer(); // Include the footer.php file
?>