hmmm that is odd. i did not find a css issue, so it must be something else.
as a test try this to see if the avatars render correctly in the area if there is correct code.
function rkk_topic_av() {
echo bbp_get_topic_author_link( array( 'size' => '48' , 'type' => 'avatar'));
}
add_action('bbp_theme_before_topic_title','rkk_topic_av');
then give me the results then we will look over it more.
Where should I place this code? single-post-reply.php? Sorry, new to bbPress. Thank you for the response.
@hunniemaid
you place the code in your child themes functions.php or you can use a plugin like this
https://wordpress.org/plugins/functionality/
with that plugin you go to plugins> edit functions then place the code i gave you.
Here are the results from placing the code in my functions.php file:
You will see that I now have an avatar picture showing up next to the topic title, still no change to the other small avatars.
try this CSS code and hopefully this fixes your issue.
it looks too small at 14px so i bumped it up to 24px , you can change that back to 14 if you want.
#bbpress-forums img .avatar-14 {
height: 24px;
width: 24px;
padding: 0;
border: none;
}
#bbpress-forums .bbp-author-avatar .avatar-14 {
width: 24px;
height: 24px;
padding: 0;
border: none;
}
if that does not work try this
#bbpress-forums .bbp-author-avatar .avatar-14 {
width: 24px !important;
height: 24px !important;
padding: 0 !important;
border: none !important;
}
Alright the second code worked. Thank you so much for helping. Do you by chance have any suggestions on how to un-blur my avatar picture? Thank you again.
use this PHP function to resize the small avatars
function my_bbp_change_avatar_size($author_avatar, $topic_id, $size) {
$author_avatar = '';
if ($size == 14) {
$size = 24;
}
$topic_id = bbp_get_topic_id( $topic_id );
if ( !empty( $topic_id ) ) {
if ( !bbp_is_topic_anonymous( $topic_id ) ) {
$author_avatar = get_avatar( bbp_get_topic_author_id( $topic_id ), $size );
} else {
$author_avatar = get_avatar( get_post_meta( $topic_id, '_bbp_anonymous_email', true ), $size );
}
}
return $author_avatar;
}
/* Add priority (default=10) and number of arguments */
add_filter('bbp_get_topic_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
add_filter('bbp_get_reply_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
The CSS you would have to use now is
#bbpress-forums .bbp-author-avatar .avatar-24 {
width: 24px !important;
height: 24px !important;
padding: 0 !important;
border: none !important;
}
and you can remove the first function i gave you to test with
For some reason when I added the function code to my functions.php it gave me a 500 Internal Server Error.
did you copy it correctly I just tested it out and pasted it right from my functions.php file
Im going to paste it again just in case it was me that forgot something.
function my_bbp_change_avatar_size($author_avatar, $topic_id, $size) {
$author_avatar = '';
if ($size == 14) {
$size = 24;
}
$topic_id = bbp_get_topic_id( $topic_id );
if ( !empty( $topic_id ) ) {
if ( !bbp_is_topic_anonymous( $topic_id ) ) {
$author_avatar = get_avatar( bbp_get_topic_author_id( $topic_id ), $size );
} else {
$author_avatar = get_avatar( get_post_meta( $topic_id, '_bbp_anonymous_email', true ), $size );
}
}
return $author_avatar;
}
/* Add priority (default=10) and number of arguments */
add_filter('bbp_get_topic_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
add_filter('bbp_get_reply_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
Plus i basically just got this code from here
Resizing Avatars
Worked like a charm, thank you.