Controlling how your posts display throughout your site is easily done with a choice of 2 template tags and a bit of additional code. Full posts are displayed by using the_content() and excerpts are displayed by using the_excerpt().
the_content() and more
This tag will display a full post unless you use the more tag. The more tag is set whilst writing the post. You can click a button on your post area’s toolbar or, if you’re not using the richtext editor then you can also type it in. The more tag looks like:
<!--more-->
Note,…
Conditional tags allow you to control the information displayed on a page depending on whether a certain criteria is met. They’re always used in a standard PHP if statement and there are conditional tags for almost every check that you could think of.
The PHP Code
The PHP code used with conditionals is a standard PHP if statement. ie.
if (condition) {
statement here;
}
Using a Conditional Tag
The most used conditional tag I use is the tag to check if the page the user is currently on is the front page. When WordPress is being…
Today sees the release of a WordPress Plugin which I’m sure will be popular. Pawan Agrawal from Max Blog Press contacted me a few weeks ago to give me a preview of this new plugin which aims to make adding advertisements to your blog quicker and easier.
By default, the plugin lets you add banners to 4 zones : Within the post, the sidebar (via a widget), top of first post and bottom of first post. You can also add new zones. The add zone feature is extremely flexible. You can align…
Today marks the first day of a long weekend for me. You see, this weekend I plan on fully optimizing all of my blog themes, cleaning up the code and adding in the final needed plugins to make them as search engine friendly as possible.
I started working on this earlier, and during a coffee break I got the itch to hunt around for a few themes that were already well optimized. The following is a list of what I found.
First two up to bat are Bitter Sweet and Shades of…
Sometimes you want to write a post that stands out from the rest. Usually giving the selected post an additional CSS class will do the trick, but how do you work out which posts need highlighting? This is simply done by creating a new category called ‘Featured’ (note you can call the category anything you like, but I’ll refer to it as Featured in this post).
If you create a new category called ‘Featured’ to highlight your posts, you can choose whether to also keep this category displayed on the category…