• I have changed it so that posts now shows up as News and it is working on the sidebar but I am trying to figure out how to also change the right now wording to say News insted of Posts. Also in the top bar dropdown for new it still says Post and I would like fo this to say News.

    Thank you below is the code I am using so far

    function change_post_menu_label() {
    	global $menu;
    	global $submenu;
    	$menu[5][0] = 'News';
    	$submenu['edit.php'][5][0] = 'News';
    	$submenu['edit.php'][10][0] = 'Add News';
    	$submenu['edit.php'][16][0] = 'News Tags';
    	echo '';
    }
    function change_post_object_label() {
    	global $wp_post_types;
    	$labels = &$wp_post_types['post']->labels;
    	$labels->name = 'News';
    	$labels->singular_name = 'News';
    	$labels->add_new = 'Add News';
    	$labels->add_new_item = 'Add News';
    	$labels->edit_item = 'Edit News';
    	$labels->new_item = 'News';
    	$labels->view_item = 'View News';
    	$labels->search_items = 'Search News';
    	$labels->not_found = 'No News found';
    	$labels->not_found_in_trash = 'No News found in Trash';
    }
    add_action( 'init', 'change_post_object_label' );
    add_action( 'admin_menu', 'change_post_menu_label' );
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Cleanly modifying things in the backend can be a challenge. I’ve had to resort to jQuery a few times because I could not find a proper hook. But then a few times when I resorted to jQuery, someone later pointed out some hook I was unable to locate initially that did the job. I guess I’m not so good at finding hooks.

    I just wanted to point out jQuery may be an option, though not preferred. Good luck with your search for good hooks.

Viewing 1 replies (of 1 total)
  • The topic ‘Rename posts on right now dashboard’ is closed to new replies.