The Simplest WordPress Theme

I tried to create 'The Simplest Wordpress Theme' while preserving the 'blog nature' of 'Wordpress Content Management System'.

Requirements

I should be able to make new posts to my blog and modify them via admin interface. Blog theme should use as less as possible code in the theme.

The Simplest Wordpress Theme

I found following solution for this. with only two files. index.php and style.css.


index.php
#index.php
<?php while ( have_posts() ) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php endwhile; ?>


style.css
/*
Theme Name: The Simplest WP Theme
Theme URI: http://php-sri-lanka.blogspot.com
Author: Upeksha Wisidagama
Author URI: http://upeksha-wisidagama.co.cc
Description: the simplest possible wordpress theme
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: simple, wp, theme, simple, minimal
Text Domain: none-except-minimal
*/


This is the theme front appearence after activating the theme. Just the posts. No styles have been applied except p and h1 tags.


If you view source this will be shown.


Excercise

Clone into the source at GitHub and modify the source until you get the desired results.


https://github.com/upekshawisidaga/The-Simplest-Wordpress-Theme
https://github.com/upekshawisidaga/The-Simplest-Wordpress-Theme.git

No comments:

Post a Comment