BLOG DESIGN (Web site builder) SOLUTIONS And that s it. If you

BLOG DESIGN SOLUTIONS And that s it. If you were now to load index.php in your browser, you would see the title of your posts styled as h1 tags per our rules defined in CSS. Everything in WordPress can be styled by CSS. The bit of PHP in the preceding snippet is one of WordPress s template tags. So now is a good time to talk about template tags and template structure in WordPress. Template structure WordPress has a pretty sophisticated theme system, which allows you to change how it looks and operates. We ll be making use of this quite a bit throughout this chapter. And although it might seem slightly complicated at first, it yields quite a bit of power that can make for a more dexterous blog in the long run. Perhaps the best thing about the theme system is how easy it is to change the face of your blog in one fell swoop at the click of a button. We will be using the default theme that ships with WordPress for most of our examples. It is called Kubrick, after the late visionary movie director. Although there are many reasons why we will use this theme as our foundation, the most important is that it will always be available to everyone because it is the default WordPress theme. Also it is widely used and has already been through the hands of thousands of users, so support is usually very close at hand. And of course, Michael built the thing. File structure Kubrick comes as a package of a number of files and a directory for images. All these files work together, depending on what WordPress needs to serve up to the reader, and it might take three or four files to serve up a single page for a reader. We will look at each file that makes up Kubrick a little later in this chapter. Now there s no reason why an entire theme can t fit into a single file. But once you gain a sense of the structure, the compartmentalized approach used in Kubrick makes it considerably smoother to take care of system-wide changes to the theme. To integrate these various files, WordPress has been equipped with a range of functions for calling in the needed files (include tags) as well as functions for determining what kind of page it currently needs to show (conditional tags). If you open up the index.php from the default Kubrick theme that comes with WordPress 1.5 in a text editor, you will see that the very first line of code contains a tag called get_header. This piece of code actually displays the contents of header.php. The last three lines of index.php are also include tags, namely get_sidebar and get_footer, and each one displays the contents of sidebar.php and footer.php, as you would expect. Using these include tags makes it much easier to create a wide range of pages that all share the same structure, layout, and information. Using this technique, changing copyright information or something similar in the footer will immediately spread to all the pages on your site.

WordPress database error: [Table 'armadillowebhosting_com_-_apache.wp_comments' doesn't exist]
SELECT * FROM wp_comments WHERE comment_post_ID = '258' AND comment_approved = '1' ORDER BY comment_date

Leave a Reply