With follow code you can upload a featured image for forums… But if you want a good looking image on social networks I recommend you install Yoast (for example) to upload a custom image for share options.
/* Add Featured Image to bbPress Forums */
add_post_type_support('forum', array('thumbnail'));
function ks_forum_icons() {
if ( 'forum' == get_post_type() ) {
global $post;
if ( has_post_thumbnail($post->ID) )
echo get_the_post_thumbnail($post->ID,'thumbnail',array('class' => 'alignleft forum-icon'));
}
}
add_action('bbp_theme_before_forum_title','ks_forum_icons');
Source Link
Thanks, Arutam!
I love Yoast. But, to be able to upload an image for sharing networks, doesn’t that require being able to access a URL in the Page editor? I think that’s the problem I’m having is there’s no way for me to do that. Does using this code supply that function?
And, where does the code get installed? I’m not a dev at all, so most of my knowledge is plug-and-play.
Code goes into the file functions.php that you can find on Appearance – Editor – Function.php. Open the file and paste it at the end. Just be careful because depending the theme code it can work fine or break your wordpress (if it breaks the wp just remove the code using cpanel or ftp).
The code allow you to upload featured image for bbpress forums. Then you can give it css style for a better looking.
To do this you need administrator access.