Class styles generated by Word Press

As we learned in Chapter 3, WordPress content is generated mostly by those bits of PHP code known as template tags, which look like have_posts or the_category, and so on.

Until recently, WordPress template tags did not output many CSS styles. In Chapter 3, we used the wp_list_pages tag and learned it output a few classes that could be used to style menu items. With the release of 2.7 and now 2.8, we have a few new template tag functions that output quite a few class styles.

What I find particularly nice about WordPress' class styles is they're descriptive and useful and if you choose, optional. I would recommend that you do leverage them and be sure you account for them in your theme's style sheet.

Styling tip

Remember, you can set CSS styling rules not only for CSS classes such as .classname, but also for XHTML markup objects such as h2, li, p, div, form, and so on, and for IDs such as #idname. In targeting objects, classes, and IDs you have quite a bit of power in controlling your theme's layout!

Bigger Blogging Profits

Bigger Blogging Profits

Are You Ready to Start Writing? Times are very hard, and there is no reason to assume or imagine that things are going to improve any time soon. The world as a whole has undergone some very traumatic changes over the last few years, and the financial situation in most countries seems grim.

Get My Free Ebook


Post a comment