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
- Import bootstrap 5 and bootstrap icons in wp-admin backend
- Adding custom columns to custom post types
- Users with custom roles not showing in post author select box
- Any amazing WordPress MultiSite sites? [closed]
- Add URL field to the link post format
- How to fix broken upgrade to 3.1
- Add new Control to Customizer to modify Headings (h1, h2, h3…) Color
- How to change URL Custom Page?
- Comments not nesed with custom template
- What will happen to the additional CSS when the theme is updated?
- Multiple Blogs on one site. Best Practise
- Limiting allowed html elements/strip harmful scripts from editor
- Customizing default Mediaelement player
- Custom members area (interface/design) in WordPress, is it possible and how?
- Override database config for WordPress multiblog
- Password protected photo galleries
- How do I fix unexpected redirection of visitors after enabling multisite on WP3?
- Add more then one site logo – custom-logo theme support
- How to get “string” away – replaced with “nothing” [closed]
- Can not sanitize select control in customize api
- Multiple RSS feeds scroller in one sidebar
- Custom Status of Custom Post type need to EXCLUDE from Taxonomy pages
- redirect post id to post full url
- Silo Structure; Will links from home page to a Sub-category or Post undermine silo seo advantage? [closed]
- Manage multiple domains from one backend
- custom default avatar showing broken link
- Is there a way to by-pass the pagination function on one custom template?
- Where in code to replace content before display of page?
- Changes in my child theme from customizer not appearing in style.css?
- Search URL parameters query [duplicate]
- How to add span on WordPress Title for first and third word
- Edit specific text on a static page
- Showing Meta Box via Jquery Checkbox
- Problem with custom function from jQuery slider tutorial
- Search & column order by meta value in admin
- Problems with setting up a subdomain to serve images and scripts
- Change login cookie expiration time?
- Disable “-mp4-image” screenshots from appearing in Media?
- Post filter with multiple checkbox taxonomy terms
- Replace publish date in blog module with custom field
- Multi-site customization
- Is there a way to limit multi upload in media upload box?
- Use another theme template in my theme
- Pulling posts into static site (wordpress as subdirectory)
- Call a duplicate registration form with other url
- WP Customizer – what types of fields is it capable of supporting?
- How to make my wordpress site responds for 2 domains
- How to answer, and we aren’t using WordPress to manage your site? [closed]
- responsive screen not working [closed]
- Where did I put this one line of css?