As you may have noticed, I have implemented a “Featured Post&” module on the top of my main blog page. This module displays information about a particular post that I want to display more prominently.
I have been considering adding a feature like this for some time, but until I received some inspiration from from Philip Moore over at Big Square Blog I really had no direction on how to begin.
Philip suggests using his technique to display a post on a static WordPress Page, but I opted to use it to display a feature post on my main index template page. I used the code Philip supplied and tweaked it for my own use. Philip’s basic code assumes that you are going to display the content of your most recent post. However, in my situation I don’t want to display the most recent post. Instead, I want to identify a particular post and have the content of this post displayed in the “Featured Post” area of my blog.
After considerable thought, I decided to use two WordPress custom fields to accomplish this task. After spending an hour or so reading information about custom fields over at the WordPress codex, I opted to useI one custom field as a logical marker to identify which post to display. I used a second custom field to contain a very brief introduction paragraph describing the post. Depending on your particular blog, you may actually be able to use the WordPress
the_excerpt() function to accomplish this. However, since I use a fairly detailed excerpt for each of my posts, I found that they were too long to be of use in the small “Featured Post” area.
Combining Philip’s technique with custom fields allows me to control the “Featured Post” implementation from within the WordPress dashboard. Simple, clean and effective. I am really pleased with the results.
How do you like my “Featured Post” module? Can you think of a way to use this idea on your blog?