Menü schliessen
Created: March 10th 2021
Last updated: December 10th 2021
Categories: Php,  Wordpress
Author: Tim Fürer

WordPress: Create a basic Template

Tags:  guide,  PHP,  Template,  wordpress
Donation Section: Background
Monero Badge: QR-Code
Monero Badge: Logo Icon Donate with Monero Badge: Logo Text
82uymVXLkvVbB4c4JpTd1tYm1yj1cKPKR2wqmw3XF8YXKTmY7JrTriP4pVwp2EJYBnCFdXhLq4zfFA6ic7VAWCFX5wfQbCC

In this very short guide, I'll show you how to make a basic WordPress Template.

If you haven't made a WordPress Theme yet, consider reading this guide first.

Creating the WordPress Template

Inside your WordPress Theme folder, create a file that is named something along the lines of "template-something.php".

For your Template to work, you need to include a header Comment, just like when making a Theme:

<?php
/**
 * Template Name: Something Template
 */

And here is some code you can use as the base of your Template:

get_header();
if (have_posts()) {
	//code
}
get_footer();

This is how your code might look like:

WordPress Theme Code Example

If you need more information, check out the official WordPress Documentation on Templates.