According to the WordPress codex a WordPress theme is:
"A collection of files that work together to produce a
graphical interface with an underlying unifying design for a weblog"
the Basics of a WordPress theme development Themes are comprised of a collection of template files and
web collateral such as images, CSS stylesheets, and JavaScript.
In Basics of a WordPress theme development The next diagram illustrates how the WordPress theme works
with the WordPress system: core installation, theme files, plugin files, and
MySQL database, to serve up a complete HTML page to the browser:
We'll go over the specifics and code examples of each part
of a WordPress theme in detail in Chapter 3, Coding it Up, but here are the
basics to get you started
The template hierarchy
The most important part of a WordPress theme to start
realizing now is the template hierarchy. A WordPress theme is comprised of many
file types including template pages. Template pages have a structure or hierarchy
to them. That means, if one template file is not present, then the WordPress
system will call up the next level template file. This allows developers to
create themes that are fantastically detailed, which take full advantage of all
of the hierarchy's available template files, and yet make the setup
unbelievably simple. It's also possible to have a fully functioning WordPress
theme that consists of no more than an index.php file and a stylesheet.
Tips:
You can see the template hierarchy in detail at http://codex.
wordpress.org/Template_Hierarchy.
The Loop
Within most template pages in the hierarchy (not
necessarily all of them), we'll be adding a piece of code called "the
Loop". The Loop is an essential part of your WordPress theme. It
displays your posts in chronological order and lets you define custom display
properties with various WordPress template tags wrapped in HTML markup.
Template tags and API hooks:
Looking within a template page's "Loop", you'll
find some interesting bits of code wrapped in PHP tags. The code isn't pure
PHP, most of them are WordPress-specific tags and functions such as template
tags, which only work within a WordPress system. Most tags and functions can
have various parameters passed through them.
Not all WordPress tags and functions go inside the Loop.
If you were to poke around the header.php file included in the default Twenty
Ten theme, you'll find several tags that work outside the Loop. Specifically
in the header.php template page (as well as the footer.php and sidebar.php template
pages), you'll also find several WordPress-specific functions that are part
of the Plugin API and Script API.
Again, no need to worry about the specifics of these now.
We'll be covering all these terms in detail with examples and, Coding it Up.
|
Our development strategies
The approach of this book is going to take you through
the unique and beautiful route (or unique and awesome, whatever your
design aesthetics call for) with the idea that once you know how to create a
theme from scratch, you'll be better at understanding what to look for in
other WordPress themes, premium themes, and frameworks. You'll then be able
to assess when it really is better or easier to use an already built theme
versus building up something of your own from scratch.
Fonts and typefaces
The Cufon
JavaScript technique, but for now, let's get some basic typography under
our belts.
When
envisioning the theme's typography, think about the type of information the
site will (or might) hold, and what's expected along with what's in vogue
right now. Try to think in terms of headers, secondary fonts, block-quotes,
specialty text (for code), and paragraph page text.
You can
use any fonts you want as long as you think there's a really good chance that
others will have the same font on their computers. Here is a list of the
basic fonts that work well on the screen:
..Fonts designed for viewing on
screen:
..Fonts available on most Macs
and/or PCs:
F ..Fonts
commonly used for code:
|
No comments:
Post a Comment
We are happy for leaving comments,we will don't let you bite stay with us