Chapter 2: The WordPress Syntax

Now that you’ve got your WordPress install set up, it’s time to do something with it. This chapter is all about getting to know more about WordPress. It doesn’t go into depth on every file in the system but rather serves as an introduction to how WordPress outputs content. You’ll learn about the important template tags as well as conditional tags and how you can control their output and actions by passing parameters. You also take a look at themes and what they consist of, to help you further grasp how WordPress sites are built.

It’s time to get started.

WordPress and PHP

From here on, it will help if you know a little bit about PHP, as well as HTML and CSS. If these are alien concepts to you, be sure to read up on them at least a bit. A good, albeit a bit technical, place to start is the official specification documents from W3 ( and Zend’s PHP 101 course ( You don’t need to be an expert, but a little knowledge is definitely needed.

WordPress is written in PHP, a popular scripting language offering developers the possibility to build just about anything. If you’re even the least bit knowledgeable in PHP, you’ll quickly find your way around WordPress and the various functions that it offers on the plugin and theme development end of things. That being said, you don’t need any prior PHP experience to do funky stuff with WordPress. Granted, you won’t be able to create WordPress plugins without knowing ...

Get Smashing WordPress: Beyond the Blog, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.