The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

How to display a Custom Field as a column in the Manage Posts table? (2 posts)

  1. lokeshdhakar
    Posted 9 years ago #

    I'm using WP 2.2 as a simple Job Listing CMS. I have added a custom field called Location to the Post page. How can I get this custom field to display as a column in the Manage Posts table listing.

    By default you see something like this:
    ID | When | Location | Author | Categories | Comments | Author

    Opening up wp-admin/edit.php you can see some related code:

    // define the columns to display, the syntax is 'internal name' => 'display name'
    $posts_columns = array(
    	'id'         => '<div style="text-align: center">' . __('ID') . '</div>',
    	'date'       => __('When'),
    	'title'      => __('Title'),
    //	'categories' => __('Categories'),
    //	'comments'   => '<div style="text-align: center">' . __('Comments') . '</div>',
    	'author'     => __('Author'),
    $posts_columns = apply_filters('manage_posts_columns', $posts_columns);

    Any help is greatly appreciated. Thank you.

  2. pampfelimetten
    Posted 8 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic