Tutorial by Examples

To create a custom template we first need to create php file in a theme directory. You can name it almost any way you want. For this example we will create example.php One and only thing we need to define inside our example.php, to be recognized by WordPress as a template, is template name. We do t...
Let's extend our template from above and include content from header.php and footer.php Including header: We will include header right after Template name comment There are two common ways to do this. Both are right and work same, it's just about your style and how code looks First way: <?ph...
We will further extend our template and include title of the page and a content <?php /* Template Name: Example */ get_header(); the_title(); the_content(); get_footer(); And if you want you can wrap them with HTML elements like this <?php /* Template Name: Example *...

Page 1 of 1