Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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