How to: Display your current mood on your posts

January 29, 2009 at 8:35 am

Did you used to be a Live Journal member some years ago? I remember that when you wre writting a post, you were asked for your mood, which will later be displayed on your blog. Here is how to recreate the same functionnality under WordPress.

Open your single.php file (You can also modify your index.php file) and paste the following code anywhere within the loop:

$customField = get_post_custom_values("mood");
if (isset($customField[0])) {
echo "Mood: ".$customField[0];

Save the file. Now when you’ll write a new post, just create a custom field named mood and type your current mood as a value.