Making a WordPress navigation page using shortcodes

I just created a special navigation page for this blog that makes pretty good use of the WordPress.com [archives] shortcode.

It looks pretty good on this Twenty Eleven theme using the full-width ‘Showcase template’, but it should work just fine on any WordPress blog. Just grab the code below and give it a try.

<table>
<tr><td style="width:20%">Some recent posts:</td><td colspan="4">[archives limit=6 format=custom order=asc before='· ' after=' ']</td></tr>
<tr><td>Last four months:</td>[archives format=custom type=monthly limit=4 showcount=true before='<td>' after='</td>']</tr>
<tr><td>Last four years:</td>[archives format=custom type=yearly limit=4 showcount=true before='<td>' after='</td><']</tr>
</table>

The random page trick is achieved simply by crating a link anywhere on your blog to /?random, even in your main menu.

<p>Try a <a href="/?random"><strong>random post</strong></a>.<p>

One thought on “Making a WordPress navigation page using shortcodes

  1. Pingback: Some custom CSS to pimp your WordPress blog | halfblog.net

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s