At the last time, in “Create Original Theme in WordPress 1“, I created the simplest minimum theme “techblog”. I’ll create practical WordPress theme from now on.
GOAL
To design the configuration of the WordPress site.
the configuration of pages
This is the page transition diagram. The top page is home. Pages “Home”, “About”, “Links” and “Posts(Post List)” can be accessed directly with main menu.
This is the construction of each page and links among them.
Detail design of each page
Home page
This page is used for “Home”.
Posts page
This page is used for “Posts (all posts)”, the result searched by categories and the result searched by words.
Single Page
This page is used for “About”, “Links” and the page for each single posts.
Side bar
Some of these items can be added easily by using Plugins.
style.css is the style sheet for the site. style.css should have infromation about the theme. Please check “Main Stylesheet (style.css)” in wordpress.org for details.
/*
Theme Name: Techblog
Theme URI: #
Author: Nako
Author URI: https://s-nako.work
Description: This is the simplest theme for engineer's technical blog
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techblog
Domain Path: /languages/
Tags: blog, news,
This theme, like WordPress, is licensed under the GPL.
*/
body {
color: #6B6B6B;
background-color:#DADADA;
font-family: 'Open Sans', sans-serif;
line-height: 1.7;
font-size: 14px;
}
The information in style.css is displayed in Appearance >Themes.
functions.php
functions.php is function set for the site. I don’t use any original function at this time.
<?php
/**
* techblog functions and definitions
* @package Techblog
* @since Techblog 1.0
*/
if ( ! defined( 'TECHBLOG_VERSION' ) ) {
// Replace the version number of the theme on each release.
define( 'TECHBLOG_VERSION', '1.0.0' );
}
Install the created theme
Put the directory where index.php, style.css and functions.php is into the themes directory “xampp\htdocs\wordpress\wp-content\themes”.
You can activate the theme you created in the Appearance >Themes.
I’d like to create my original theme for WordPress. This is the preparation for development of WordPress in XAMPP.
GOAL
To create develop environment for WordPress development in XAMPP.
Environment
Windows10 XAMPP 7.4.10
If you don’t have XAMPP, please install it first according to “Installation of XAMPP“. And If you’ll use MariaDB in a production environment, make it secure by setting password according to “How To Set MySQL Password in XAMPP“.