CHAPTER 3
DIGGING INTO THE TWENTY TEN THEME
YOU CAN DO a ton of things with WordPress themes. Up until now, I have really just scratched the surface. In this chapter, I dig a bit deeper and try some functions and features you may find useful, depending on the goals of the site that you're building.
In this chapter, I cover the rest of the basics that I discuss in Chapter 2, and then you get your hands a bit dirty by working with the Twenty Ten theme. You'll learn how to work with the custom menu feature, custom header images, and more. The goal is to show you what you can do with WordPress, what fancy features are within a few lines of code's grasp, and what you'll need plugins or more advanced coding to achieve.
Right, let's go. Bring a shovel.
WORKING WITH THE LOOP
The loop is what makes WordPress tick, looping through your content and outputting the items that meet your criteria. So if you're on a category archive, WordPress loops through all the posts that belong to the selected category and outputs them, but only as many times as are set in the Reading Settings screen on your admin panel (as shown in Figure 3-1). So if you've set WordPress to show ten posts per page, the loop outputs ten posts, and then stops. Obviously the count is for valid outputs. If WordPress stumbles upon something that doesn't belong to said category, the loop just skips it and moves on to the next, until ten posts have been reached. This is something you really should know about since getting control ...
Get SMASHING: WordPress Themes: MAKING WORDPRESS BEAUTIFUL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.