
DISPLAY POST THUMBNAIL ALSO IN EDIT POST AND PAGE OVERVIEW
WordPress chronicle 2.9 introduced a duty of Post Thumbnail. We wrote about this underline in this post as well as here as well as additionally in most alternative blogs. we find it an advantage, if a general outlook of articles as well as pages additionally provides a compared thumbnail. Therefore, we would similar to to deliver a tiny formula dash which creates only that.
![]()
The on top of screenshot should spell out what a small prolongation does. The following formula contingency be put in a Plugin or be copied in to a functions.php of a theme.
if ( !function_exists('fb_AddThumbColumn') && function_exists('add_theme_support') ) { // for post as well as page add_theme_support('post-thumbnails', array( 'post', 'page' ) ); function fb_AddThumbColumn($cols) { $cols['thumbnail'] = __('Thumbnail'); return $cols; } function fb_AddThumbValue($column_name, $post_id) { $width = (int) 35; $height = (int) 35; if ( 'thumbnail' == $column_name ) { // thumbnail of WP 2.9 $thumbnail_id = get_post_meta( $post_id, '_thumbnail_id', true ); // picture from gallery $attachments = get_children( array('post_parent' => $post_id, 'post_type' => 'attachment', 'post_mime_type' => 'image') ); if ($thumbnail_id) $thumb = wp_get_attachment_image( $thumbnail_id, array($width, $height), true ); elseif ($attachments) { foreach ( $attachments as $attachment_id => $attachment ) { $thumb = wp_get_attachment_image( $attachment_id, array($width, $height), true ); } } if ( isset($thumb) && $thumb ) { echo $thumb; } else { echo __('None'); } } } // for posts add_filter( 'manage_posts_columns', 'fb_AddThumbColumn' ); add_action( 'manage_posts_custom_column', 'fb_AddThumbValue', 10, 2 ); // for pages add_filter( 'manage_pages_columns', 'fb_AddThumbColumn' ); add_action( 'manage_pages_custom_column', 'fb_AddThumbValue', 10, 2 ); }
Related posts:
- New underline in WordPress 2.9 – the_post_image()
- About WordPress Post Thumbnail
- The Ultimative Guide For the_post_thumbnail In WordPress 2.9
- WordPress 2.9 add_theme_support as well as has_post_image
- Display Always All Subpages in Sidebar
Thanks for subscribing a feed! Sponsor a WP Engineer Blog as well as get your code in front of multiform hundred users per day!
© WP Engineer Team, All rights indifferent (Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)
Read a original:
Display Post Thumbnail Also In Edit Post as well as Page Overview




Using WordPress chronicle 2.9, there is right away a probability that you can write some-more minute outline for a widget areas. This is generally engaging when you conclude opposite widget areas, depending of categories or since a thesis writer defines assorted widget areas, that allows adjustments in some-more areas than only a sidebar. you do this for e.g. in a thesis Greyfoto, where a footer area is additionally versed with widgets.
WordPress 2.9 RC1 is expelled as well as a code new post thumbnail duty will not shift until a final chronicle hopefully.
Behind a 10th doorway of a Advent Calendar, you have a tip how to make use of mixed mention lengths. WordPress 2.9 allows you around filter to regulate
Check out a 7th doorway of a Advent Calendar.



