O'Reilly logo

SMASHING: WordPress Themes: MAKING WORDPRESS BEAUTIFUL by Thord Daniel Hedengren

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required