Back to Top

How to add column In Post Manage Page WordPress

To add custom column to the list page in Wordpress

WordPress is a great platform for building any kind of websites and it has a sufficient back-end, but sometimes you need to make changes in layout.

In this post, we’re going to go through how to add a new column into post listing dashboard of WordPress admin.

Let’s dive into the steps to add featured image into the post listing need to add below code into your theme’s function.php file.

First of all, you need to write add filter and add_filter used to add new label of column is manage_post_posts_columns.

function post_thumbnail_column( $cols ) {
    $cols['thumbnail'] = __('Featured Thumbnail');
    return $cols;

add_filter( 'manage_post_posts_columns', 'post_thumbnail_column' );

Must Read: How to use Ajax in WordPress with example

Next, you can add action which will be useful to display image into listing page.Here I wanted to display featured image so I have used function get_the_post_thumbnail.

add_action( 'manage_posts_custom_column', 'custom_thumbnail_column' );

function custom_thumbnail_column( $column ){
     global $post;
     $custom = get_post_custom();
     switch ($column) {
        case 'thumbnail' :
           if (has_post_thumbnail($post->ID)) 
               echo get_the_post_thumbnail($post->ID, 'thumbnail');

Read about: Customize Contact Form 7 in WordPress

Here,get_post_custom function which returns values with all custom fields of a particular post or case is the key of the array passed to create a label.

So, now you have a new column in post can see into your WordPress can add any field by following above steps.

Thank you for reading.Feel free to share your thoughts! Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

Getting started with Laravel

Posted on 1 year ago


How to import terms from csv in wordpress?

Posted on 5 years ago


The Reader’s Poll – June 2015

Posted on 3 years ago


The Reader’s Poll – August 2014

Posted on 4 years ago


The Reader’s Poll – June 2014

Posted on 4 years ago


The Readers’ Poll – May 2014

Posted on 5 years ago


The Readers’ Poll – August 2013

Posted on 5 years ago