WordPress: Build a Theme from Scratch Part 1

In order to create a Theme in WordPress, there are a lot of steps involved, here are some snippets to remember

Under wordpress/wp-content/themes/ create a new folder /automatictheme (you can name this folder as you would like)
inside of this folder you will need a style.css file.

Your style.css file should look like this:

/*
Theme Name: Automatic Theme
Theme URI: http://propellermind.com/automatictheme
Author: PropellerMind
AuthorURI: http://propellermind.com/
Description: This is a theme built from scratch
Version: 1.0
Tags: automatic theme
*/

Inside the same folder, we are going to create some php files.

a header.php file will look like this:

<!doctype html>
  <html>
  <head>
  <meta charset="utf-8">
  <title>Untitled Document</title>
  </head>
<body>

A footer.php file that will look like this:

<footer>
<p>This is my footer</p>
</footer>
</body>
</html>

And a index.php file that will call and include the header.php and footer.php files:

<?php get_header(); ?>
<h1>This is my index</h1>
<?php get_footer(); ?>

Go to your Worpress Dashboard and under Appeareance, Activate your new theme!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>