The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Snippet · PHP

Add a Featured Image Column to the WordPress Posts List

Shared by Amit Dholiya · October 8, 2026 · @manage_posts_columns,manage_posts_custom_column

9 views
1 upvote
Back to Snippets

Steps

  1. Add the PHP code to your theme’s functions.php.
  2. Save the changes.
  3. Go to WordPress Dashboard → Posts → All Posts.
  4. A new Featured Image column will appear.
  5. Posts with a featured image will show a thumbnail.
/**
 * Add Featured Image column to WordPress Posts list
 */
function custom_add_featured_image_column( $columns ) {

    $columns['featured_image'] = 'Featured Image';

    return $columns;
}

add_filter( 'manage_posts_columns', 'custom_add_featured_image_column' );


/**
 * Display Featured Image in the custom column
 */
function custom_display_featured_image_column( $column, $post_id ) {

    if ( 'featured_image' !== $column ) {
        return;
    }

    if ( has_post_thumbnail( $post_id ) ) {

        echo get_the_post_thumbnail(
            $post_id,
            array( 80, 60 ),
            array(
                'style' => 'object-fit: cover;'
            )
        );

    } else {

        echo 'No Image';
    }
}

add_action(
    'manage_posts_custom_column',
    'custom_display_featured_image_column',
    10,
    2
);

Tested on

WordPress 6.8

Reported by the author on October 8, 2026. WPFolks has not verified this.

Not tested against WordPress 7.1.3. It may still work.

Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments