Featured Image Column

This plugin has no options. It simply adds a column before the title (far left) the show’s the posts featured image if it’s supported and/or exists.

Add a defualt image simply by filtering you own image in. Use featured_image_column_default_image or filter your own CSS by using featured_image_column_css.

Add support for a custom default image

function my_custom_featured_image_column_image( $image ) {
    if ( !has_post_thumbnail() )
        return trailingslashit( get_stylesheet_directory_uri() ) . 'images/featured-image.png';
}
add_filter( 'featured_image_column_default_image', 'my_custom_featured_image_column_image' );

Add/remove support for post types

function my_custom_featured_image_column_post_type( $post_types ) {
    foreach( $post_types as $key => $post_type ) {
        if ( 'post-type' === $post_type ) // Post type you'd like removed. Ex: 'post' or 'page'
            unset( $post_types[$key] );
    }
    return $post_types;
}
add_filter( 'featured_image_column_post_types',   'my_custom_featured_image_column_post_type', 13 );

Add your own CSS to change the size of the image.

/**
 * @use '.featured-image.column-featured-image img {}'
 */
function my_custom_featured_image_css() {
    return trailingslashit( get_stylesheet_directory_uri() ) . 'css/featured-image.css'; //URL to your css
}
add_filter( 'featured_image_column_css', 'my_custom_featured_image_css' );

For question please visit my blog @ http://austinpassy.com

Download

Latest version: Download Featured Image Column v0.2.1 [[zip]] (Downloaded: 9872 times)

FAQ

Nothing yet

Changelog

Version 0.2.1 (12/3/13)
  • Fixed custom post type support.
Version 0.2.0 (12/2/13)
  • Updated version to WordPress 3.8 compatable and PHP 5.3+
  • Added new filter featured_image_column_post_types for post type support (add/remove).
  • Removed closing PHP.
Version 0.1.10 (9/5/13)
  • Fixed PHP Deprecated: Assigning the return value of new by reference is deprecated in /featured-image-column/featured-image-column.php on line 157.
Version 0.1.9 (3/11/12)
  • Fixed repeat images per posts.
  • Added filter to style sheet, (use your own CSS to make the thumbnail bigger).
Version 0.1.8 (2/16/12)
  • Updated wp_cache_set/get
Version 0.1.7 (1/18/12)
  • Tried to update some code to fix repeated images.
Version 0.1.6 (11/21/11)
  • Code edits by Chris Jean of ithemes.com.
Version 0.1.5 (10/18/11)
  • Fixed latest post image showing up across all posts.
  • Reset the query check.
Version 0.1.4 (10/17/11)
  • Added filter for post_type‘s, thanks to Bill Erickson
  • Fixed error when zero posts exists (very rare).
Version 0.1.3 (10/17/11)
  • Added a light caching script for the images.
  • Updated a contributors .org profile name.
Version 0.1.2 (9/30/11)
  • Removed PHP4 constructor.
  • TODO: Fix error when no posts exists.
Version 0.1.1 (9/20/11)
  • Add support for public $post_type‘s that support 'post-thumbnails'.
Version 0.1 (9/14/11)
  • Initial release.

Screenshots

  1. featured-image-column screenshot 1

    Post edit.php screen.

12 Comments


  1. Hi Just updated –
    my site is

    korekauai.com

    The FI column now displays the same image for each post.

    Reply
    1. acht

      Same as user above

      The FI column now displays the same image for each post.

      Reply
    2. thom

      The if statement on line 124 is returning false on all entries after the first one. I just commented it out (along with the trailing curly bracket at the end of the block) and all of my thumbnails loaded as they should. True, it bypasses the featured image check, but in my tests, this isn’t a problem, and it works just fine. Hope that helps!

      Would also love to see slightly larger thumbnails in the next version! Thanks for the great plug-in!

      Reply

  2. Seems to work fine if you remove “post” from line #122:

    change:

    $image = wp_cache_get( 'featured_column_thumbnail', 'post' );

    to:

    $image = wp_cache_get( 'featured_column_thumbnail');
    Reply
    1. anon

      Great plugin frosty – seems unique, and just what I was after.

      (And thanks too, to Johan for the fix – works perfectly).

      Reply

  3. Hey there, I did some work on the plugin to make it work on ajax-powered quick edits in edit.php.

    get_post_type() seems to start working who-knows-when so I replaced it with $post_type = $_GET['post_type'] which should always work in the admin anyway.

    It also seems like there is no load-admin-ajax.php action so I had to replace it with a more complete detection. This way I also was able to get rid of the load() method.

    Lastly, "Assigning the return value of `new` by reference is deprecated on line 158" so I left the "&" out.

    Reply

  4. Hey there, I did some work on the plugin to make it work on ajax-powered quick edits in edit.php.

    get_post_type() seems to start working who-knows-when so I replaced it with $post_type = $_GET['post_type'] which should always work in the admin anyway.

    It also seems like there is no load-admin-ajax.php action so I had to replace it with a more complete detection. This way I also was able to get rid of the load() method.

    Lastly, “Assigning the return value of `new` by reference is deprecated on line 158″ so I left the “&” out.

    Here it is: http://pastebin.com/qNfNbmAa

    Reply
  5. Palak

    Hello,

    I want to add one more column to set the order of the featured images. is that possible? or do you have any another plugin for the same? please guide me. Its urgent for me.

    Regards,
    Palak

    Reply

  6. Great Plugin, is there an easy way to apply this to custom post types. I took a quick look at the code and didn’t see anything to obvious.

    Reply

    1. Just kidding, I now found the line where the post type just has to allow for a thumbnail. Sorry for the confusion.

      Reply
  7. Jonas

    Error in wp 3.6, after a loooong use of this plug in many configs, we have inactivate the plug for now on all updated sites.

    Deprecated: Assigning the return value of new by reference is deprecated in W:\Servers\UniServer-00\www\wpcl\wp-content\plugins\featured-image-column\featured-image-column.php on line 157

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>