first create the new column:
add_filter( 'manage_edit-post_columns', 'c3m_new_column');
function c3m_new_column( $defaults ) {
$dfaults['post_thumbnail'] = 'Post Thumbnail';
return $defaults;
}
Now the function to output the thumbnails in the column:
add_action( 'manage_posts_custom_column', 'c3m_custom_column', 10, 2);
function c3m_custom_column( $column_name, $post_id ) {
if ($column_name == 'post_thumbnail') {
if ( has_post_thumbnail() ) {
$img_url = wp_get_attachment_image_src( get_post_thumbnail_id() );
echo '<img src="'. esc_url( $img_url[0] ).'" />';
} else { echo 'No Post Thumbnail Set'; }
}
Related Posts:
- How to remove admin menu pages inserted by plugins?
- Making Custom Fields Standard in the Admin UI
- Modify column_author in WP_Comments_List_Table
- Custom ReCaptcha Login
- Creating my own Admin Forms in a WordPress CMS?
- How to make custom bulk actions work on the media/upload page?
- Removing fields from the Media Uploader/Gallery
- deleted users still show in count?
- How to build custom WP admin with custom URLs
- Redirect members to custom page upon logging in through WP admin
- Adding an email column to a Custom Post Types Admin Screen?
- Custom Dashboard Home Screen Options
- Add a page that appears in the backend admin that lists files to download? WP 3.3
- Adding “Interesting Tags” & “Ignored Tags” like StackOverflow.com in a WordPress Blog?
- How do I change the default admin color scheme in MP6
- Custom column sorting in WordPress admin post table
- Extend Screen Options
- Admin Panel – Custom Menu Sub-Item LINK
- Adding custom styles to dropdown in editor
- how to add custom css and js on wordpress post editor directly without using .php file
- Advanced Custom Fields: Sorting custom columns with custom fields sorts only by date
- How to customize core admin pages within a theme?
- Allow non-admins to access the Customize theme page
- How to change popular term checklist title when edit post?
- WordPress customizer Preview not loading
- How to use default WP form elements to interact with custom DB table?
- Extend WordPress Core Classes in OOP Theme?
- Changer numbers of columns in woocommerce shop
- Customizing Users in Admin Area
- Restrict Viewing of post on both front and backend?
- add custom content to appearance/widgets screen
- theme customizer – can a single option pass multiple values?
- How to remove admin menu pages inserted by plugins and themes in the top admin bar?
- Customizing admin look and feel for just one particular type of user
- Open login logo URL in new tab
- Change admin_title of a plugin using code snippet/functions
- Delete a column in edit.php generated with a plugin
- Add admin page for specific post status (for example)
- How to show Term ID beside Name Category with wp_dropdown_categories()
- How to create custom backend admin menu in different languages?
- POST 429 Error when trying to place more than 20 images into post at once
- Figuring out how to create “Option Pages” in WordPress admin
- Check get_post value after wp-admin login
- Custom Admin Section
- where can i find the login page in wordpress and add my header to it
- Style Radio Buttons inside Edit Page (Custom Fields)
- Changing a setting in the wp-admin/customize.php reverts CSS styles to parent theme [closed]
- Create Custom Admin Fields
- How to create functions that affect only a specific user
- Prevent posts from being published if the ‘Uncategorized’-category or no category is selected
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Any post install tips after installing WordPress 3.0.1?
- How do I filter the excerpt metabox description in admin?
- Maintaining synced staging/production WP sites
- WordPress Multi Site Best Practice
- Sub posts and non unique post_name
- How to let a single post have its own domain name
- Redirect to requested page after (custom) login
- How to instantly delete posts/pages permanently?
- How to re-arrange media uploaded using : media_handle_upload() as per year / month
- How could we customize the all posts page in the admin panel?
- Adding Pagination on a Custom Author Page
- How can I get the page url slug when ‘post_name’ returns an id?
- Multiple Tinymce/wp_editor in WordPress >4.8
- How to provide a demonstration of WordPress for new customers
- How to add a button which saves the post then executes a function
- Showcase elementor templates
- Add clickable arrows to parent menu items with children elements e.g. with
- Display User ID instead of Name or Username
- Woocomerce custom billing address fields display in order details [closed]
- Bind JS event to WordPress control customizer
- How can I setup up an a pre-populated pdf based on what was entered? [closed]
- Get rid of title from static front page
- Make custom page look exactly as homepage
- $wpdb->insert running multiple times?
- How to query details of images in gallery that is attached to a post
- Where to store reusable content that is not a page
- WordPress broken after changing URL
- How to make the Pages in WordPress Customized?
- Custom “wp_login.php?action=lostpassword” and reset password
- wp_enqueue_script JS code runs too late (after user begins interacting)
- Validate user login in php
- Adding a custom field to a slug
- Query Product categories what have a custom field
- WordPress Customizer: Check for value of CSS selector and replace it
- How to add custom Author Info Box to blog posts “only” and NOT custom post templates
- Bio comes up when the visitor clicks on a picture
- How to find and replace (or add) specific word in a specific category?
- WooCommerce – Adding custom HTML to specific product pages
- How do I move my sites to a child theme without loosing customisation?
- Displaying all Custom fields on post except some
- How to appoint different users to different pages?
- Is there a way to hide a user’s posts from their Activity feed?
- customize footer widgets area
- Accessing + retrieving custom database in WordPress
- Word Press Theme Customiser and Child theme Function.php
- Security Issues with custom user role or changing core role capabilities?
- adding new html css to wordpress section from codepen [closed]
- Add custom information in editor summary
- A Voting system for a pageants