Show Featured Image in Your WordPress Admin Dashboard

2 Comments

When you are working with a WordPress theme that relies heavily on the use of a featured image, it is helpful having a visual guide showing where you have used them.

I am currently working on a site that uses the WordPress thumbnail as the background image in several places. It’s important that administrators can see whether a featured image has been set on Posts, Pages or custom post types, or some of the theme impact will be lost.

To make things easier, I wanted to show a thumbnail in the Admin dashboard of the featured image that had been set. Rather than use a plugin, I added some code to the functions.php in my theme. I found the code here on crunchify.com. I’m adding it below for my own convenience!

Quick note: Thanks to Laura at thepixelpixie.com for her debugging.

How to add a featured image to the WordPress admin list pages

Open up the functions.php file in your theme and add this code.

You should now see a new column when viewing your Posts and Pages in list view:

featured image column

Add Column for Featured Images in WordPress

WordPress , ,


2 Comments

  1. Laura

    Hi there,
    Your code has some errors. First, the apostrophes are curly and all have to be changed in your editor. Second, you’re missing brackets in your if statement near the end. Third and final, this eliminates all the other columns for the posts and pages instead of adding the image column.

    • Haiz Design

      Thanks very much Laura,
      I have updated the code. I have encoded this now so the apostrophes are correct and added the missing brackets. It was not eliminating the other other columns in any of the sites where I have added it, but again, thanks for Pixie-Debugging!

It's good to talk!

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

Please answer before submitting form * Time limit is exhausted. Please reload CAPTCHA.