Created
May 12, 2015 16:55
-
-
Save jymartineau/685651f11ddd1211b260 to your computer and use it in GitHub Desktop.
How to Add a Featured Image Column to WordPress Dashboard
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
//Add a Featured Image Column to WordPress Dashboard | |
add_filter('manage_posts_columns', 'posts_columns', 5); | |
add_action('manage_posts_custom_column', 'posts_custom_columns', 5, 2); | |
function posts_columns($defaults){ | |
$defaults['riv_post_thumbs'] = __('Featured Image'); | |
return $defaults; | |
} | |
function posts_custom_columns($column_name, $id){ | |
if($column_name === 'riv_post_thumbs'){ | |
echo the_post_thumbnail(array(100,100)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is from http://coffeecupweb.com/how-to-add-a-featured-image-column-to-wordpress-dashboard/ - great post guys!!