wordpress custom archive page type
i'm starting with wordpress (from a drupal background) and trying to figure out how to create a new "menu" or url pattern. not quite sure what the lingo is in wordpress so im having a little trouble searching online for it.
the current archive allows you to sort by: /post/date/2010/06
what i'm trying to do is extend the archive functio开发者_C百科nality to include a "day" as well. ie. /post/date/2010/06/22
i dont mind creating a new page type for this purpose such as /archive/YYYY/MM/DD or something like that.
not sure where to begin with matching the "url pattern" to the "url handler" function or template.
I ended up using:
<ul><?php wp_get_archives('type=daily'); ?></ul>
It gave me an archival list of links which point directly to the pages I needed. The archive already supported filtering by day, so I just needed to find a way to access it.
The url pattern is /post/yyyy/mm/dd
If anyone is interested in generating a link directly to that page, use:
<?php echo get_day_link(2010, 6, 20); ?>
Wordpress can customize the style of permalinks you use on the Settings/Permalinks tab of your administrative page. It sounds like you want something like /%year%/%monthnum%/%day%/%postname%
, which should allow you to group by year, year/month, and year/month/date.
精彩评论