Skip to main content
added 28 characters in body
Source Link

Use this hook to add custom column to admin post/page list view.

add_filter('manage_posts_columns', 'add_img_column');
add_filter('manage_posts_custom_column', 'manage_img_column', 10, 2);

function add_img_column($columns) {
    $columns['img'] = 'Featured Image';
    return $columns;
}

function manage_img_column($column_name, $post_id) {
    if( $column_name == 'img' ) {
        returnecho get_the_post_thumbnail($post_id, 'thumbnail');
    }
    return $column_name;
}

Put this code in your functions.php

Use this hook to add custom column to admin post/page list view.

add_filter('manage_posts_columns', 'add_img_column');
add_filter('manage_posts_custom_column', 'manage_img_column', 10, 2);

function add_img_column($columns) {
    $columns['img'] = 'Featured Image';
    return $columns;
}

function manage_img_column($column_name, $post_id) {
    if( $column_name == 'img' ) {
        return get_the_post_thumbnail($post_id, 'thumbnail');
    }
}

Put this code in your functions.php

Use this hook to add custom column to admin post/page list view.

add_filter('manage_posts_columns', 'add_img_column');
add_filter('manage_posts_custom_column', 'manage_img_column', 10, 2);

function add_img_column($columns) {
    $columns['img'] = 'Featured Image';
    return $columns;
}

function manage_img_column($column_name, $post_id) {
    if( $column_name == 'img' ) {
        echo get_the_post_thumbnail($post_id, 'thumbnail');
    }
    return $column_name;
}

Put this code in your functions.php

Source Link

Use this hook to add custom column to admin post/page list view.

add_filter('manage_posts_columns', 'add_img_column');
add_filter('manage_posts_custom_column', 'manage_img_column', 10, 2);

function add_img_column($columns) {
    $columns['img'] = 'Featured Image';
    return $columns;
}

function manage_img_column($column_name, $post_id) {
    if( $column_name == 'img' ) {
        return get_the_post_thumbnail($post_id, 'thumbnail');
    }
}

Put this code in your functions.php