Wordpress template tags you should know

Status
Not open for further replies.

Osiris

Golden Master
Messages
36,817
Location
Kentucky
Source: Wordpress template tags you should know

If you run a Wordpress blog, you will eventually want to make some modifications to your theme. Perhaps you want to show your tags, not just categories, perhaps you want the date in a different format, you might want to add the URL of the author to each post, there are a lot of things like that which can easily be done with a little knowledge of Wordpress template tags, which are little PHP code snippets, but you don't have to be a coder to use them.
The great thing about these tags is that they are very well documented “see link above”, and that they are extremely simple to use. You don't need to know anything about PHP, so let me explain their basic use in common sense language. Wordpress uses a loop, elegantly called “the loop” in “Wordpressian”, which cycles through the posts you have.
If you show 10 posts on your main page, the loop cycles through the latest 10 posts. This means that one the first loop it will pull in the data of your latest post, on the second pass it will look at the second and so on. All the data is pulled, all you need to do is specify what you want to display out of that data, let's take a look at how.
 
Status
Not open for further replies.
Back
Top Bottom