Created
January 6, 2014 02:47
-
-
Save ntwb/8277457 to your computer and use it in GitHub Desktop.
bbPress - Forum Icons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working well, thanks! ;)