Quantcast
Channel: bbPress.org » All Posts
Viewing all articles
Browse latest Browse all 3638

Reply To: compact bbpress

$
0
0

That doesn’t seem to be possible in 2012, which forces a sidebar if you want a search facility, and which consumes a lot of vertical space with the identity of the contributor, including a large avatar.

Good job we’re in 2014 then :-)

If you switch on the search facility
dashboard>settings>forums and look for search allow forum wide search, you’ll get a search bar at the top of the forums page

for the avatar size use the following code in your functions file

function my_bbp_change_avatar_size($author_avatar, $topic_id, $size) {
    $author_avatar = '';
    if ($size == 14) {
        $size = 24;
    }
    if ($size == 80) {
        $size = 110;
    }
    $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);
add_filter('bbp_get_current_user_avatar', 'my_bbp_change_avatar_size', 20, 3);

The example increase the size, just change to to what you want

see http://codex.bbpress.org/functions-files-and-child-themes-explained/ for how to do that

you can also remove things like keymaster – just come back with what you want – and we’ll try to help you


Viewing all articles
Browse latest Browse all 3638

Trending Articles