Daily wisdom on blogging

How is WordPress structured and why is it structured as such?

0 5

WordPress has a modular structure.  The three different types of pages rendered are broken down into different parts with separate php code.  To properly understand WordPress (or any LAMP based CMS website) one needs to appreciate that it is after all a play between the php code, the CSS stylesheets (which control the theme components and look and feel) and the database (which stores everything – data, pics and other files).

The three types of pages that WordPress is divided into are:

  1. Front Page
  2. Single Post page
  3. Multi-post page (category page, archive page or search)

Now, each of these pages have typically these components within their code.  Remember: We are taking of a plain and vanilla structure.  We could get more complicated structures to do different things.  But this is the basic minimum!

Front Page has:

index.php
header.php
sidebar.php
footer.php

Single Post page has:

single.php
header.php
sidebar.php
footer.php
comments.php

And the Multi-post page has:

index.php
category.php
404.php
search.php
header.php
sidebar.php
footer.php

All these are neatly structured in one whole via the WordPress code overall.  The Rarst’s diagram explains the WordPress structure in the best possible way.  Check this out.

wordpress-core-load-lifecycle

 

Diagram courtesy: Tom Macfarlin

Also please check out the following links for more information:

WordPress Semantics

Glossary ” WordPress Codex

Featured Image Courtesy: Flickr

Leave A Reply

Your email address will not be published.