• Hi all, i’m setting up a custom post for my portfolio, on the columns i currently have title, description, and comments but would like to add a small version of the thumbnail.. more out of experiment than necessity, i have tried referencing ‘thumbnail’ and ‘the_post_thumbnail’ but neither seem to work

    Any help is much appreciated

    Thanks
    Dan

Viewing 1 replies (of 1 total)
  • Thread Starter meshdesign

    (@meshdesign)

    my fault.. i hadnt realised i had spelt the case of thumbnail wrong.. for anybody else wishing to solve it

    add_filter("manage_edit-product_columns", "prod_edit_columns");
    	add_action("manage_posts_custom_column",  "prod_custom_columns");
    
    	function prod_edit_columns($columns){
    			$columns = array(
    				"cb" => "<input type=\"checkbox\" />",
    				"title" => "Product Title",
    				"description" => "Description",
    				"thumbnail" => "Thumbnail",
    			);
    
    			return $columns;
    	}
    
    	function prod_custom_columns($column){
    			global $post;
    			switch ($column)
    			{
    				case "description":
    					the_excerpt();
    					break;
    
    				case "thumbnail":
    				echo the_post_thumbnail('small-post-thumbnail');
    				break;
    
    			}
    	}

    i have declared small-post-thumbnail with a width and height in earlier code.

Viewing 1 replies (of 1 total)
  • The topic ‘Add Thumbnail to the Column Overview’ is closed to new replies.