Under the Title of each post, I want it to say "written on [date] by [author] in [category]" and I want the author and the category to both be links. So I've been hunting through the forums and made a function that basically works the way I want it to but is lacking the categories bit and even then, it seems excessive. Can anybody help me? This is what I have:
// Add a custom post header
function childtheme_postheader() {
global $post;
if (is_page()) { ?>
<?php } elseif (is_404()) { ?>
<h1 class="entry-title">Yikes! Not Found</h1>
<?php } elseif (is_single()) { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<span class="meta-sep"><?php _e('Written on ', 'thematic') ?></span>
<span class="entry-date"><abbr class="published" title="<?php get_the_time('Y-m-d\TH:i:sO'); ?>"><?php the_time('F jS, Y') ?></abbr></span>
<span class="author vcard"><?php $author = get_the_author(); ?><?php _e('by ', 'thematic') ?><span class="fn n"><?php _e("$author") ?></span></span>
</div><!-- .entry-meta -->
<?php } else { ?>
<h2 class="entry-title">" title="<?php printf(__('Permalink to %s', 'thematic'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></h2>
<?php if ($post->post_type == 'post') { // Hide entry meta on searches ?>
<div class="entry-meta">
<span class="meta-sep"><?php _e('Written on ', 'thematic') ?></span>
<span class="entry-date"><abbr class="published" title="<?php get_the_time('Y-m-d\TH:i:sO'); ?>"><?php the_time('F jS, Y') ?></abbr></span>
<span class="author vcard"><?php $author = get_the_author(); ?><?php _e('by ', 'thematic') ?><span class="fn n"><?php _e("$author") ?></span></span>
</div><!-- .entry-meta -->
<?php } ?>
<?php }
}
add_filter ('thematic_postheader', 'childtheme_postheader');