In the last post, I spoke about why I choose WordPress as my site’s CMS program. Along the way, I needed to learn about how WordPress worked as part of the preparation for installing and running WordPress on my main site.
First was the issue of static HTML vs dynamic pages.
Static vs Dynamic Pages
In preparation for installing and setting up WordPress for our website, I had to learn how different functions…well, function. In theory, I had the idea of how template files worked, but theory and reality are totally different things.
The first part of learning about the functions were learning their names.
To me, a web page is made up of HTML pages and style sheets. I was now entering a new world where something called PHP pages become HTML pages and they aren’t “web pages” but template files.
In its most simplest form, a WordPress template file can generate every single web page on your site. The core template is called
index.php and within it are the codes and tags that go into the database and collect information and then post it so you can see it on your site. The results are found within a generated HTML page.
Different template files can be used to create different results, and WordPress uses modular template files to break up a single document into different parts, like the header, footer, sidebar, and main content page. For more info on templates, check out the WordPress Codex article on Templates.
Inside of WordPress template files are bits of PHP code that go into your database and collect the information to display on your generated HTML page. These are called template tags. One example is the template tag found in the title of your page’s header. Instead of looking like:
<h1><a href="http://example.com/index.php">My Website Name</a></h1>
It uses the
bloginfo() template tag to generate the information as set up in your WordPress Administration Options:
<h1><a href="<?php bloginfo('url'); ?"><?php bloginfo('name'); ?></a></h1>
This is a very simple usage. The WordPress template tags are very powerful and some are flexible, allowing you to use different parameters to change the end result. I’m still learning about these, but you can find more information about them at Codex’s Template Tags.
The WordPress Loop
You will find a lot of references to the WordPress Loop in the documentation and on the WordPress Support Forum. You can probably understand what this is better than I can, but basically it is a loop of PHP code that says, if this, go do that, then if this, go do that, and go back and check again that all the conditions have been met and then spit out the web page so people can see the nice results. It uses conditional tags which set the conditions that are to be met to generate the information.
It took me a while to figure out the difference in WordPress between a page and a Page. Basically a page is a normal post created by running through the WordPress Loop, just another web page on your site. An individual Page is not so much static as it is outside of the Loop. It doesn’t grow old and stale and move from the front pages to the archives. A Page is used to create helpful web pages like “About”, “Contact”, “Site Policies”, “Site Map”, and other pages you need to flesh out your website.
So the difference between a static HTML page and a dynamic PHP generated page is that one stays the same no matter what, and the other changes depending upon what information the user inputs by their choices on the page. WOW!
To Infinity and Beyond: WordPress Plugins
WordPress Plugins are bits of PHP code which do things on your site within your WordPress setup. Some plugins help you fight spam, others add features, and others are just plain fun. There are even tutorials on how to write your own WordPress plugins, if you feel inclined. I’m still playing with these, but you can find WordPress plugins by searching the Internet or on the following sites:
- WordPress Codex Plugins List
- Redalt Official WordPress Plugins
- Bloggingpro’s WordPress Plugins List
For the most part, these plugins require you to do little but activate the plugin code and then sit back and watch it work. For others, you will have to venture into your
index.php or other template or configuration files to make a few changes. In general, the documentation that comes with most plugins is fairly specific and easy to help you make the adjustments. And who knows, you might have so much fun messing around under the hood, you might just create some fun plugins of your own.
WordPress Themes – Quick Change the Website’s Face
A WordPress Theme is a collection of template files and a style sheet which create the “look” or presentation of your WordPress website. Last I heard, there were over 400 themes to choose from. The cool thing about Themes is that you can instantly change the look of your site with a couple clicks, or, if you are into dazzling your visitors, use a Theme Switcher that will allow the users to pick what Theme they want to see on your site when they visit.
To use a WordPress Theme, find the Theme you want and upload it to its own subfolder under
wordpress/wp-content/themes/. In the Administration pages, click on Presentation. Select and activate the Theme you want to use, and then look at your site. Bingo, instant makeover. Many people are starting to get into making their own WordPress Themes and I spent a lot of time reading about how they did it so I could customize my own
Here are some sites that helped me learn more about WordPress Themes:
Now The Process Begins
With this information and the documentation found in the WordPress Codex – the online manual by my side, I began the process of transferring my site to WordPress with a new understanding of how it works under the hood. In a future post, I’ll get into the details on how I changed WordPress to make it, literally, my own. Stay tuned!
Site Search Tags: wordpress, learn, learn about wordpress, wordpress help, wordpress layout, wordpress tips, using wordpress, wordpress structure, wordpress php, wordpress modular layout, dynamic web pages, cms, wordpress as cms, wordpress designs, wordpress themes, wordpress theme design, understanding wordpress
Copyright Lorelle VanFossen, member of the 9Rules Network