Last active
October 17, 2015 08:58
-
-
Save ckaklamanos/5b9c25311bb9f12f0d29 to your computer and use it in GitHub Desktop.
Wordpress Better page management
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
// Add excerpt to pages | |
add_action( 'init', 'custom_add_excerpts_to_pages' ); | |
function custom_add_excerpts_to_pages() { | |
add_post_type_support( 'page', 'excerpt' ); | |
} | |
/* | |
Add Page Order column to Pages List Admin page | |
*/ | |
add_filter('manage_pages_columns', 'custom_columns'); | |
function custom_columns($columns) { | |
$columns['order'] = 'Order'; | |
return $columns; | |
} | |
add_action('manage_pages_custom_column', 'custom_show_page_order_column'); | |
function custom_show_page_order_column($name) { | |
global $post; | |
switch ($name) { | |
case 'order': | |
$views = $post->menu_order; | |
echo $views; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment