I’d like to use the new [archives] shortcode
What [archives] shortcode? I can’t find any reference to this in wp-includes/shortcode.php.
Have a look at:
http://codex.ww.wp.xz.cn/Creating_an_Archive_Index
I was following the directions here:
http://support.wordpress.com/archives-shortcode/
“To create an archive index for your blog, simply add a new page…and type the following shortcode into your visual editor:
[archives]”
The page you linked to seems to be geared towards WP 1.5x, so I don’t know how applicable it is to 2.8.4, but it references an ‘archives.php’ that should be in the theme directory. There’s no such file in the the Elegant Grunge theme directory, so I guess that’s why it’s broken– it’s not a supported feature of the theme.
That sucks, but thanks for pointing me in the right direction.
Okay, did a little more digging, and I was able to get what I wanted by following the directions here:
http://blogmum.com/2009/05/how-to-make-a-wordpress-archive-page/
With a little customization, I now have the page doing exactly what I want.
If anyone else is having this issue, here is my archive-page.php:
<?php
/*
Template Name: Archive
*/
?>
<?php get_header(); ?>
<div id="content-container">
<div id="content">
<div id="body">
<h2><?php the_title(); ?></h2>
<p class="majuscule">Posts by category</p>
<div class="post">
<?php wp_list_categories(); ?>
<p class="majuscule">All post titles:</p>
<?php wp_get_archives('type=postbypost') ?>
</div>
<?php edit_post_link(__('Edit this entry.', 'elegant-grunge'), '<p>', '</p>'); ?>
</div>
<?php if ( get_option('page_setup') != 'no-sidebar' ) get_sidebar(); ?>
</div>
<div class="clear"></div>
</div>
<?php get_footer(); ?>
Still, the [archive] shortcode is a lot easier, so it would be nice if the Elegant Grunge theme supported it.
It has nothing to do with your theme. The [archives] shortcode is not currently a part of the WordPress software.
Notice the link you posted:
http://support.wordpress.com/archives-shortcode/
WordPress.com is a service owned by Automattic. It’s not the self-hosted version of WordPress you download here.