I want to change the size of the featued image for one custom post type only. This is what I currently have:

function custom_admin_thumb_size($thumb_size){

    global $post_type;
    if( 'slider' == $post_type ){

        return array(1000,400);


        return array(266,266);

add_filter( 'admin_post_thumbnail_size', 'custom_admin_thumb_size');

This function does what I expected but I was wondering if there is any better method to call the custom post type “slider” without touching the others.

Thanks in advance

Read more here: Change admin post thumbnail size for custom post type only


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: