Book Image

WordPress 2.8 Theme Design

Book Image

WordPress 2.8 Theme Design

Overview of this book

Themes are among the most powerful features that can be used to customize a web site, especially in WordPress. Using custom themes you can brand your site for a particular corporate image, ensure standards compliance, and create easily navigable layouts. But most WordPress users still continue to use default themes as developing and deploying themes that are flexible and easily maintainable is not always straightforward. It's easy to create powerful and professional themes for your WordPress web site when you've got this book to hand. It provides clear, step-by-step instructions to create a robust and flexible WordPress theme, along with best practices for theme development. It will take you through the ins and outs of creating sophisticated professional themes for the WordPress personal publishing platform. It reviews the best practices from development tools and setting up your WordPress sandbox, through design tips and suggestions, to setting up your theme's template structure, coding markup, testing and debugging, to taking it live. The last three chapters are dedicated to additional tips, tricks, and various cookbook recipes for adding popular site enhancements to your WordPress theme designs using third-party plugins. Whether you're working with a pre-existing theme or creating a new one from the ground up, WordPress Theme Design will give you the know-how to understand how themes work within the WordPress blog system, enabling you to take full control over your site's design and branding.
Table of Contents (15 chapters)
WordPress 2.8 Theme Design
Credits
About the Author
About the Reviewer
Preface
Index

The layout


Let's start making this stuff look like our sketch!

You'll notice in our XHTML markup that each of our div tags has an ID name. The div tags that are going to be our three columns are wrapped inside an outer div called container2, the main and the left columns are wrapped in a div called container3, and the entire set of divs, including the header and footer, are wrapped in a main div tag called container.

This structure is what's going to hold our content together and display WordPress semantically with the main content first. Along with this it also lets the style allow the left column to show up on the left. This structure also ensures that the footer stays at the bottom of the longest column.

In the stylesheet, I've set up my basic CSS positioning like the following:

body {
 margin: 0px;
 margin-top: 10px;
 font-size: 0.8em;
 line-height: 1.5em;
 font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
 color: #666;
}

#container {
  margin: 0 auto;
  width: 930px...