Change label from Posts to Articles in Wordpress dashboard option

// Replace Posts label as Articles in Admin Panel

function change_post_menu_label() {
   global $menu;
   global $submenu;
   $menu[5][0] = 'Articles';
   $submenu['edit.php'][5][0] = 'Articles';
   $submenu['edit.php'][10][0] = 'Add Articles';
   echo '';
}
function change_post_object_label() {
       global $wp_post_types;
       $labels = &$wp_post_types['post']->labels;
       $labels->name = 'Articles';
       $labels->singular_name = 'Article';
       $labels->add_new = 'Add Article';
       $labels->add_new_item = 'Add Article';
       $labels->edit_item = 'Edit Article';
       $labels->new_item = 'Article';
       $labels->view_item = 'View Article';
       $labels->search_items = 'Search Articles';
       $labels->not_found = 'No Articles found';
       $labels->not_found_in_trash = 'No Articles found in Trash';
}
add_action( 'init', 'change_post_object_label' );
add_action( 'admin_menu', 'change_post_menu_label' );

Comments

Popular posts from this blog

datatable with both top and bottom scroll bar.

Display Loader and disable page while waiting for ajax request

Invalid bean property or is not readable to loading Jsp page