I used the following code to add slug option to Screen Options on Posts screen, but how can I add this to Pages screen?
//* Add slug to screen options
add_filter('manage_posts_columns', 'my_column');
function my_column($defaults){
$defaults['my_slug'] = __('slug'); /*Add our column to the list of default columns*/
return $defaults;
}
add_action('manage_posts_custom_column', 'custom_column_data', 10, 2);
function custom_column_data($column_name, $id) {
if( $column_name == 'my_slug' ) {
$post_slug = get_post($ID = $id)->post_name;
echo $post_slug;
}
}