Created
February 17, 2017 11:42
-
-
Save macgraphic/6904e92ddf2f04d59c5fd6919f24c95a to your computer and use it in GitHub Desktop.
Change Admin Menu For Blog Posts
This file contains hidden or 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
// Change Admin Menu For Blog Posts | |
function macg_change_post_label() { | |
global $menu; | |
global $submenu; | |
$menu[5][0] = 'Blogs'; | |
$submenu['edit.php'][5][0] = 'Blogs'; | |
$submenu['edit.php'][10][0] = 'Add Blogs'; | |
$submenu['edit.php'][16][0] = 'Blogs Tags'; | |
} | |
function macg_change_post_object() { | |
global $wp_post_types; | |
$labels = &$wp_post_types['post']->labels; | |
$labels->name = 'Blogs'; | |
$labels->singular_name = 'Blogs'; | |
$labels->add_new = 'Add Blogs'; | |
$labels->add_new_item = 'Add Blogs'; | |
$labels->edit_item = 'Edit Blogs'; | |
$labels->new_item = 'Blogs'; | |
$labels->view_item = 'View Blogs'; | |
$labels->search_items = 'Search Blogs'; | |
$labels->not_found = 'No Blogs found'; | |
$labels->not_found_in_trash = 'No Blogs found in Trash'; | |
$labels->all_items = 'All Blogs'; | |
$labels->menu_name = 'Blogs'; | |
$labels->name_admin_bar = 'Blogs'; | |
} | |
add_action( 'admin_menu', 'macg_change_post_label' ); | |
add_action( 'init', 'macg_change_post_object' ); | |
// END Change Admin Menu For Blog Posts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this to your themes functions.php file