Skip to content

Instantly share code, notes, and snippets.

@webhasan
Created May 16, 2016 06:14
Show Gist options
  • Save webhasan/dffc4f41e6f0a90fb90d215a44bbb7b0 to your computer and use it in GitHub Desktop.
Save webhasan/dffc4f41e6f0a90fb90d215a44bbb7b0 to your computer and use it in GitHub Desktop.
custom item in wordpress list page
<?php
add_filter('manage_posts_columns', function($columns) {
$columns['thumbnail'] = __('Post Thumbnail','leo');
return $columns;
});
add_action('manage_posts_custom_column', function($column, $id) {
if($column == 'thumbnail') {
the_post_thumbnail( array(50, 50) );
}
}, 10 , 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment