• Hi,

    I’ve created a custom post type with enabled category taxonomy. I want to rename (Internationalize) term “Category” in my custom post type submenu.

    Using this code:

    function rename_category_submenu(){
    	 remove_submenu_page(
            'edit.php?post_type=modelis',
            'edit-tags.php?taxonomy=category&post_type=modelis'
        	);
        	add_submenu_page('edit.php?post_type=modelis','Modeli? kategorijos', 'Modeli? kategorijos', 'manage_categories', 'edit-tags.php?taxonomy=category&post_type=modelis');
    }
    add_action( 'admin_menu' , 'rename_category_submenu' );

    it works. “Category” is removed and my Label is being put with correct link.

    The problem is that my customly added category submenu page link when selected doesn’t get class=”current” like other items (All posts and New).

    Is there anything I can do about it?

  • The topic ‘add_submenu_page and class="current" is not working’ is closed to new replies.