WordPress Templates

WordPress is a great blogging software, which is both feature rich and simple to use. For most beginners, it will be enough to install it and start using it. For most advanced uses and to get more control, you’ll need to tweak with the templates.


A WordPress blog is composed of the following sections :

  • header : this is the top of your page (usually a banner for your blog)
  • footer : this is the bottom of your page (few links, statistics, …)
  • page : this is where the main content goes (posts)
  • sidebar : this is the sidebar (widgets, archives, recent posts, tags…)

Altering your template

Rather unsurprisingly, altering your template can be achieved by modifying the template files corresponding to the section you want to modify.
Those files are located in your theme directory (usually something like wordpress/wp-content/themes/YOUR_THEME) and their name is the section name with an extension of “.php”. So if you want to change the sidebar, then you’ll go and edit sidebar.php.

Why to change the template?

You might want to change your template files for many purposes :

  • aesthetics (for example reordering the sections of the sidebar)
  • use of third party services (for example Google Analytics for statistics, Google AdSense for advertising, Feedburner to advertise your feeds, and so on)

For example, if you need to include some javascript code in every pages of your blog in order to get correct statistics, it may be a good idea to considering adding it in your footer.php .

If you want to include advertisement below every of your posts, you might consider adding it in the page.php .

When you’ll start tweaking your template, you’ll realize that it opens a real broad horizon of features, which will allow you to get more and more control over your blog…

One thought on “WordPress Templates”

  1. Good start, as you can see by my blog I am in the process of doing this exact thing. I haven’t gotten very far yet, but I am working on it. How about some helpful hints, such as posing the code that makes your del.icio.us & digg buttons auto fill some of the information? Currently mine just open to the post pages with blank fields.

Comments are closed.