The site I am currently working on is requiring a lot of filtering of the standard Thematic functions. Chris’ ThemeShaper page on filtering is a good place to start, as is his guide to how to use filters, but today I was looking for some direction on how best to customise the post_footer and came across Devin’s thematic filters list, which is more comprehensive than the ones I had previously come across.
However, as ever the ThemeShaper forum came up trumps with a pretty detailed guide to the innards of the thematic_post_footer and how to filter them.
With all this help, it was easy to filter the footer to get rid of everything but the postcomments, and to change this to be of the format ‘Comments (X)’ where X is the number of comments:
// change comments text
function mypostcomments() {
if (comments_open()) {
$postcommentnumber = get_comments_number();
$postcomments = ' <span class="comments-link"><a href="' . get_permalink();
$postcomments .= '#comments" title="' . __('Comment on ', 'thematic');
$postcomments .= the_title_attribute('echo=0') . '">';
$postcomments .= __('Comments (', 'thematic') . $postcommentnumber . ')</a&rt;</span&rt;';
return $postcomments;
}
}// end mypostcomments
add_filter('thematic_postfooter_postcomments','mypostcomments');