Making a WordPress navigation page using shortcodes

I just created a special navigation page for this blog that makes pretty good use of the [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.

<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>

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>

1 thought on “Making a WordPress navigation page using shortcodes

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

Comments are closed.