April 27, 2011

TOC or archives page in Wordpress.com "archives shortcode"

So there is a theoretically easy way to create a single archive in WordPress.com...but it took a little figuring out....Most of the time WordPress help file are fantastic...for some reason, I had a much harder time figuring this one out.  Here's the page: http://en.support.wordpress.com/archives-shortcode/

And he's what I learned:

for a single list of every post: [archives] (include the brackets)
Last 12 months: [archives type=monthly limit=12]
broken down to what this code means:
  • archives : you're creating an archive
  • type=monthly : you want by month
  • limit=12 : limited to the last 12 months
but unlike this blog's TOC, this code just collapses the list to the month along the lines of something like this:
  • January 2011
  • February 2011, etc...
Last 12 months with post count: [archives type=monthly limit=12 showcount=true]
again, the code means the following
  • archives : you're creating an archive
  • type=monthly : broken down by month
  • limit=12 : limited to the last 12 months
  • showcount=true : you want to see the number of post for that month
Last 18 days: [archives type=daily limit=18]
Last 32 posts: [archives limit=32]
Last 3 weeks: [archives type=weekly limit=3]
All posts in a drop-down: [archives format=option]
Last 12 months with post count in a drop-down: [archives format=option type=monthly limit=12 showcount=true]

I personally like the this blog's TOC better where it's broken down by month and still lists the title of the post...the format I like is something like this which doesn't seem to be possible in WordPress.com:
+ post
+ post
+ post
+ post
Better yet, (? maybe?)-- (or maybe this is just a category click but I don't want to see expanded posts...)
Category 1 of choice
+ post
+ post
Category 2 of choice
+ post
+ post
UPDATE: the only way I can think of to do this is to choose a template that allows you to turn your categories into pages as described here; then there's at least one WordPress.com template I know of but can't remember at the moment that allows you click on a category and return a post titles list.
Archives Shortcode « Support — WordPress.com

The WordPress page also give you a table for options that I found a tad confusing.  Once you figure out the code above, it does become much easier but I'll make it even easier.  Keep in mind that only what's in brackets is the code.

Change Type (the type of archives list to display)
  • [archives type=yearly]
  • [archives type= monthly]
  • [archives type=weekly] 
  • [archives type= daily]
  • [archives type=postbypost] 
Default Type is the postbypost.

Change Format (how to display the archives list)
  • [archives format=option] gives you a drop-down menu
  • [archives format=html] give you an unordered list
  • [archives format=custom] gfor use with the “before” and “after” parameters

And remember you can combine the codes.  For example
  • [archives type= daily format=option] gives you an archive that is broken down by day, in a drop-down menu.
More options are available on the the WordPress page, but hopefully, you get the idea....

Finally, the page also says something alone the lines of you can use some html coding...but for a real novice like me, I had no idea...so here's one thing I learned.
  • <h1> [archives] means that I want my archives formatted as heading 1 so in gigantic fonts
  • if you know a little html coding and understand the code tags, you can change the way that archives list looks

    No comments:

    Post a Comment