Skip to content

Instantly share code, notes, and snippets.

@ntwb
Created January 6, 2014 02:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntwb/8277457 to your computer and use it in GitHub Desktop.
Save ntwb/8277457 to your computer and use it in GitHub Desktop.
bbPress - Forum Icons
<?php
/*
Plugin Name: bbPress - Forum Icons
Plugin URI: https://gist.github.com/ntwb/8277457
Description: bbPress - bbPress - Forum Icons
Version: 0.1
Author: Stephen Edgar - Netweb
Author URI: http://netweb.com.au
*/
// Original Source: http://www.kristarella.com/2013/04/bbpress-forum-icons/
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');
@trueqap
Copy link

trueqap commented Jan 18, 2018

Working well, thanks! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment