denying reality

I decided to use WordPress instead of Chyrp to run my online journal. The journal, denying reality, doesn’t have the content added yet. It’s members-only: you have to register and then I have to approve your account.

I used a different color verison of the last layout I had for there. I’m still working on getting it finished, then I have to import all of my old entries (by hand).

I wanted to get a structure for the archives similar to what I had on there before. This wasn’t easy, as the default archives look nothing like that. I found some code to get archives for a specific year, but I also wanted to get it for specific months too so I added a statement to do that (this goes into your functions.php file).
[php]
<?php
function getarchives_filter($where, $args) {
if (isset($args[‘year’])) {
$where .= ‘ AND YEAR(post_date) = ‘ . intval($args[‘year’]);
}
if (isset($args[‘month’])) {
$here .= ‘ AND MONTH(post_date) = ‘ . intval($args[‘month’]);
}
return $where;
}

add_filter(‘getarchives_where’, ‘getarchives_filter’, 10, 2);
?>
[/php]

Then you use the template tag like this:
[php]
<?php wp_get_archives(‘type=daily&month=’.get_the_time(‘m’).’&year=’ . get_the_time(‘Y’)); ?>
[/php]

My next problem was how to format the archives to look like I wanted them for the monthly archives. The solution was simple, but I didn’t realize it till I read it in the comments section on someone’s blog. To replace core functions, you can just copy that function to functions.php in your theme, change the function name, and call it in your template using it’s new name.