In the previous post, we created a simple WordPress plugin. In this post, let’s create a simple Hello World WordPress theme that you can upload and install to your WordPress site.
Folder Structure
Let’s call our theme “Simple Hello World Theme” and let’s create a folder that will contain all our theme files. Let’s call this folder “shw-theme”.
We’ll also need three basic files to create our basic theme. Our folder structure would look like this –
/shw-theme
/index.php
/style.css
/screenshot.png
index.php
<?php
echo 'Hello WorldPress';
?>
style.css
/*
Theme Name: Simple Hello World Theme
Author: Omkar Bhagat
Version: 1.0
*/
screenshot.png
The screenshot.png could be any image file that you’d like to use as your theme’s thumbnail image. The resolution of this image can be found in the official WordPress.org documentation. As of now the recommended image size is 1200px wide by 900px tall.
Zip It!
Next zip the folder and the theme is ready to upload. It does nothing special. It only prints out “Hello WorldPress”.
One thought on “WP: Hello World Theme”