Fandom: that worldwide community of people and fictional creations and love we share for them and each other keeps my head above water when nothing else can. I've been flitting between fandom groups since I was nine years old, and I could never give it up.

Recent updates

The “I Love” Project

Every year since 2010 I have decided to celebrate my domain's birthday on the 11th October with some kind of project. Last year, it was the 'Love is...' Project and you submitted your definitions of love. This year, you shared what it is that you love.

On the 9th October 2011, this layout was put up with a rotation above the sidebar with chosen submissions. Read more...

Further links

WordPress Tutorial: Recently Updated Posts/Pages

Instead of manually showing what you’ve recently updated in WordPress, or having to widgetize your sidebar, you can use a simple code.

This tutorial will show you how you can use a simple piece of code to show both your recently updated posts and pages, a bit like this:

recently updated

The Code

The best place to put this code is in your sidebar or footer, where you have other website statistics and such.

<?php
$today = current_time('mysql', 1);
$howMany = 5; //Number of posts you want to display
if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_modified_gmt < '$today' ORDER BY post_modified_gmt DESC LIMIT $howMany")):
?>
<h2><?php _e("Recently Updated"); ?></h2>
<ul>
<?php
foreach ($recentposts as $post) {
if ($post->post_title == '') $post->post_title = sprintf(__('Post #%s'), $post->ID);
echo "<li><a href='".get_permalink($post->ID)."'>";
the_title();
echo '</a></li>';
}
?>
</ul>
<?php endif; ?>

Customising

The parts in bold are the ones you can edit.

You do not need to place the posts/pages in a bulleted list. They can be numbered if you like, or you can just use a <br /> after each post.

The comment number need not be in curly brackets; these can also be displayed how you like.

The number 5 is the number of posts that are displayed. Edit to your liking.

Stylesheet and CSS

You might need to change the margin and padding of your lists if you want to place the code in your sidebar. There might be too much padding (by default) so we can use an id to deal with this. We must change <ul> to <ul id="recent">. This assigns an id for that element.

<h2>Recently Updated Posts/Pages</h2>
<ul id="recent">
...
</ul>

Next we must specify this element with CSS. The following goes in our stylesheet:

#recent {
list-style-image:url('image URL');
margin-left:0px;
padding-left:9px;
}

Adjusting the padding on the left hand side will shift the list as far from the side as you wish.