Hi,
This is terrific and almost exactly what I'm trying to do. Thanks for the overall solution! I'm having trouble with one detail though and hoping for some help :)
I'm also using the local avatar plugin and have successfully implemented the solution above, but would like to preserve the standard functionality on the author archive and category archive pages (all posts by author) so that the author avatar and bio only appear once at the top of those two page types, not repeatedly (which is what they do after adding the functions above). I've tried to do this for the author page using:
if (is_author()) {
return FALSE;
}
as in:
<?php
function my_postheader_posttitle() {
global $post;
if (function_exists('get_avatar')) { // this only fails if pre WP2.5
$avtr = get_avatar($post->post_author);
}
$post_avatar = '<div class="author_avatar">';
$post_avatar .= $avtr;
$post_avatar .='</div><!-- .author_avatar -->';
// Remove avatar/author info from author page.
if (is_author()) {
return FALSE;
}
$posttitle = '<div class="post_header">';
if (is_single() || is_page()) {
$posttitle .= '<h1 class="entry-title">' . get_the_title() . "</h1>\n";
}
elseif (is_404()) {
$posttitle .= '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n";
} else {
$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 .= "</h2>\n";
}
$my_postheader_open = $posttitle . $post_avatar;
return $my_postheader_open;
}
add_filter('thematic_postheader_posttitle','my_postheader_posttitle');
function my_postheader_postmeta() {
global $id, $post, $authordata;
$posteditlink .= '<a href="' . thm_bloginfo('wpurl', FALSE) . '/wp-admin/post.php?action=edit&post=' . $id;
$posteditlink .= '" title="' . __('Edit post', 'thematic') .'">';
$posteditlink .= __('Edit', 'thematic') . '';
$posteditlink = apply_filters('thematic_postheader_posteditlink',$posteditlink);
$postmeta = '<div class="entry-meta">';
$postmeta .= '<span class="meta-prep meta-prep-author">' . __('By ', 'thematic') . '</span>';
$postmeta .= '<span class="author vcard">'. '<a class="url fn n" href="';
$postmeta .= get_author_link(false, $authordata->ID, $authordata->user_nicename);
$postmeta .= '" title="' . __('View all posts by ', 'thematic') . get_the_author() . '">';
$postmeta .= get_the_author();
//if ( !(''== $authordata->user_description) ) : echo apply_filters('archive_meta', $authordata->user_description); endif;
$postmeta .= '</a >< br/>';
$postmeta .= $authordata->user_description;
$postmeta .= '</span>< br/>';
// don't want the calendar icon. $postmeta .= '<img alt="calendar icon" src="http://magpub.com/wp-content/themes/edadv_template/images/calendar.png"/>';
$postmeta .= '<span class="entry-date"><abbr class="published" title="';
$postmeta .= get_the_time(thematic_time_title()) . '">';
$postmeta .= get_the_time(thematic_time_display());
$postmeta .= '</abbr></span>';
// Display edit link
// Remove avatar/author info from author page.
if (is_author()) {
return FALSE;
}
if (current_user_can('edit_posts')) {
$postmeta .= '<span class="edit">' . $posteditlink . '</span>';
}
$postmeta .= "</div><!-- .entry-meta -->\n";
$postheader_close = "</div><!-- .post_header -->\n";
$my_postheader_close = $postmeta . $postheader_close;
return $my_postheader_close;
}
add_filter('thematic_postheader_postmeta','my_postheader_postmeta');
?>
This does work to get rid of the avatar and author bio on the author page entirely, but I'm trying to simply suppress the function on the author and category "all posts by author" pages so that it will pick up the standard behavior previous to adding these functions. It used to just show the avatar and bio once on the top of the author page, right below the "Author Archives: Author". How would I bring that back and also have it show up that same way on the category "all posts by author" pages?
By the way, the forum stripped my tags and my tag as well so those need to have spaces removed.
Thanks in advance for your assistance.
I'm loving making my own child theme!
Sarah Reiwitch