Add column to pages table

Also an tutorial with an solution for page and post to add thumbnail in a column: http://wpengineer.com/1960/display-post-thumbnail-post-page-overview/
Change the content from thumbnail to your content and remove the hooks for post:

// for posts
// add_filter( 'manage_posts_columns', 'fb_AddThumbColumn' );
// add_action( 'manage_posts_custom_column', 'fb_AddThumbValue', 10, 2 );
// for pages
add_filter( 'manage_pages_columns', 'fb_AddThumbColumn' );
add_action( 'manage_pages_custom_column', 'fb_AddThumbValue', 10, 2 );

the id of page in backend is in the hook and you can add on all tables in backend new columns, also an example for Multisite Table:
http://wpengineer.com/2188/view-blog-id-in-wordpress-multisite/

    add_action( 'manage_sites_custom_column', array( $this, 'add_columns' ), 10, 2 );
    add_action( 'manage_blogs_custom_column', array( $this, 'add_columns' ), 10, 2 );

Leave a Comment