How to create WordPress Minimal Theme?

  • Go to the WordPress installed directory and then wp-content > themes

  • Create directory called html-to-wp-theme, you may specify different name for your theme.

  • Better to clone the project from GitHub.

git clone -branch only-html-template https://github.com/hmtmcse-com/html-to-wp-theme.git
  • Create index.php and add the below codes

<?php

echo "<h1>WordPress Minimal Theme Index</h1>"

?>
  • Create style.css and add the below codes.

/*
Theme Name: HTML to WordPress Theme
Theme URI: https://hmtmcse.com/php/html-to-wp/bismillah
Author: HMTMCSE Foundation
Author URI: https://hmtmcse.com/
Description: Step by Step Tutorial for HTML template convert to WordPress Theme
Version: 1.0.0
License: Apache License 2.0
License URI: http://www.apache.org/licenses/
Tags: html-to-wp
Text Domain: h2wp
*/
  • Take a screenshot 1200 x 900 pixels and rename it to screenshot.png

Screenshot


Install the theme

  • Login to WordPress Admin Panel & then from left navigation find and click to Appearance

  • Find out the theme called HTML to WordPress Theme and click on Active

  • Now if you browse the front, then you will see the message WordPress Minimal Theme Index which we added earlier in our index.php