WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. lokeshdhakar
    Member
    Posted 7 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
    Member
    Posted 6 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic