WordPress Theme Templates Overview

Creating themes requires you to step into the code of the WordPress templates, which can be a scary place sometimes — especially if you don’t really know what you’re looking at. A good place to start is by understanding the structure of a WordPress theme. A WordPress theme, in its very basic form, has four main areas that appear in the default theme that comes in every version of WordPress:

  • Header: This area usually contains the name of the site along with the site tagline or slogan. Sometimes, the header also contains a graphic or image.

  • Body: This area is where your content (such as blog posts, pages, and so on) appears in chronological order.

  • Sidebar: This area is where you find lists of navigation elements such as the blogroll, the archives, and a list of recent posts.

  • Footer: This area, at the bottom of the page, often contains links to further information about the site, such as who designed it, which company provides hosting for the site, and copyright information.

These four areas are the absolute bare bones of a basic WordPress site theme. You can extend these areas and create new sections that carry more information, of course.

The default WordPress theme is Twenty Thirteen. It’s a pretty doggone wonderful starting point for you, especially if you’re just getting your feet wet. To build a basic WordPress theme that covers the four basic areas of a site, you need these five templates:

  • header.php (Header)

  • index.php (Main Index)

  • sidebar.php (Sidebar)

  • footer.php (Footer)

  • style.css (Stylesheet)

Each WordPress theme comes with a stylesheet (style.css), which drives the formatting and layout of your site theme in terms of where the elements are positioned on the page, what the font looks like, what colors your hyperlinks will be, and so on. As you may have already figured out, you don’t use CSS to put content on your site; rather, you use CSS to style content that’s already there.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement

Inside Dummies.com