I've been hacking away at the Aether child theme and have been able to shape it into what I want except for one thing: I want the date to show on all posts, including those that "allow comments" have been turned off.
I've tried several ways to get this to work and cannot figure out what I'm doing wrong.
Here's the function that contains the relevant php:
// Change the Postheader
function junction_postheader() {
global $post, $authordata,$id;
//create the edit-link
$posteditlink .= '<span class="edit-link"><a href="' . get_bloginfo('wpurl') . '/wp-admin/post.php?action=edit&post=' . $id;
$posteditlink .= '" title="' . __('Edit post', 'thematic') .'">';
$posteditlink .= __('Edit', 'thematic') . '</span>';
if (is_single() || is_page()) {
$posttitle = '<h1 class="entry-title">' . get_the_title() . "</h1>\n";
$postmeta = '<div class="entry-meta">';
$postmeta .= '<div class="post-date">';
$postmeta .= '<span class="post-day">';
$postmeta .= get_the_time('d');
$postmeta .= '</span>';
$postmeta .= '<span class="post-month">';
$postmeta .= get_the_time('M');
$postmeta .= '</span>';
$postmeta .= '<span class="post-year">';
$postmeta .= get_the_time('Y');
$postmeta .= '</span>';
if (current_user_can('edit_posts')) {
$postmeta .= $posteditlink;
}
$postmeta .= "</div><!-- .post-date -->\n";
$postmeta .= "</div><!-- .entry-meta -->\n";
} elseif (is_404()) {
$posttitle = '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n";
} else {
$posttitle = '<div class="post-title">';
$posttitle .= '<h2 class="entry-title"><a href="';
$posttitle .= get_permalink();
$posttitle .= '" title="';
$posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
$posttitle .= '" rel="bookmark">';
$posttitle .= get_the_title();
$posttitle .= " <span class='readmore'> ... </span> </h2>\n";
$posttitle .= '</div>';
$postmeta = '<div class="entry-meta">';
$postmeta .= '<div class="post-date">';
$postmeta .= '<span class="post-day">';
$postmeta .= get_the_time('d');
$postmeta .= '</span>';
$postmeta .= '<span class="post-month">';
$postmeta .= get_the_time('M');
$postmeta .= '</span>';
$postmeta .= '<span class="post-year">';
$postmeta .= get_the_time('Y');
$postmeta .= '</span>';
if (comments_open()) {
$postcommentnumber = get_comments_number();
if ($postcommentnumber > '1') {
$postmeta .= ' <span class="comment">';
$postmeta .= get_comments_number() . __(' Comments', 'thematic') . '</span>';
} elseif ($postcommentnumber == '1') {
$postmeta .= ' <span class="comment">';
$postmeta .= get_comments_number() . __(' Comment', 'thematic') . '</span>';
} elseif ($postcommentnumber == '0') {
$postmeta .= ' <span class="comment">';
$postmeta .= __('Leave a comment', 'thematic') . '</span>';
}
} else {
$postmeta= ' <span class="comment">' . __('Comments closed', 'thematic') .'</span>';
}
if (current_user_can('edit_posts')) {
$postmeta .= $posteditlink;
}
$postmeta .= "</div><!-- .post-date -->\n";
$postmeta .= "</div><!-- .entry-meta -->\n";
}
$postheader = $posttitle . $postmeta;
if ($post->post_type == 'page' || is_404()) {
$postheader = $posttitle . $postmeta;
} else {
$postheader = $posttitle . $postmeta;
}
echo apply_filters( 'junction_postheader', $postheader ); // Filter to override default post header
}
add_filter ('thematic_postheader', 'junction_postheader'); // Crazy important!
Any help would be greatly appreciated.