Created
May 23, 2017 12:55
-
-
Save maxyudin/a9ceeb1923ff0e559b372155485ac8a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mxd_columns($columns) { | |
$columns['template'] = 'Template'; | |
return $columns; | |
} | |
function mxd_show_template_columns($name, $post_id) { | |
$template = get_post_meta($post_id, '_wp_page_template', true); | |
echo $template; | |
} | |
// articles CPT | |
add_filter('manage_articles_posts_columns', 'mxd_columns'); | |
add_action('manage_articles_posts_custom_column', 'mxd_show_template_columns', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment