Skip to content

Instantly share code, notes, and snippets.

@ianmjones
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianmjones/06de411f32787a0e7104 to your computer and use it in GitHub Desktop.
Save ianmjones/06de411f32787a0e7104 to your computer and use it in GitHub Desktop.
Adding columns to our Extended CPTs admin screen.
$options = array(
'labels' => $labels,
'menu_icon' => 'dashicons-media-document',
'admin_cols' => array(
'pixie_article_audience' => array(
'taxonomy' => 'pixie-article-audience',
'title' => _x( 'Audience', 'Pixie Article Taxonomy', 'pixie-article' ),
),
'post_date' => array(
'title' => __( 'Created', 'Date', 'pixie-article' ),
'post_field' => 'post_date',
),
'post_modified' => array(
'title' => __( 'Modified', 'Date', 'pixie-article' ),
'post_field' => 'post_modified',
),
),
);
register_extended_post_type( 'pixie-article', $options );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment