Created
May 16, 2016 06:14
-
-
Save webhasan/dffc4f41e6f0a90fb90d215a44bbb7b0 to your computer and use it in GitHub Desktop.
custom item in wordpress list page
This file contains hidden or 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 | |
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