I’ve created a custom post type with my requirements. I used “WP Video Gen” as menu label. But I want red marked item to name as “Videos”. Is it possible?
Ref: http://ScrnSht.com/jcvlhy
Thanks in advanced.
I’ve created a custom post type with my requirements. I used “WP Video Gen” as menu label. But I want red marked item to name as “Videos”. Is it possible?
Ref: http://ScrnSht.com/jcvlhy
Thanks in advanced.
You must be logged in to post a comment.
When you register your custom post type there’s an argument called ‘labels’ you can pass to
register_post_type()
. The argument is an associative array with named labels for the menu and screens of your post type. Specifically, the label you are looking for is called ‘all_items’.I don’t know your code for registering the post type, but here’s a short example that does what you asked for:
Other available labels are (according to the WordPress Codex by the time of writing):
hierarchical and non-hierarchical types. When internationalizing this
string, please use a gettext context matching your post type.
Example: _x(‘Add New’, ‘product’);
Name label
New Page
Posts/Search Pages
found
posts found in Trash/No pages found in Trash
non-hierarchical types. In hierarchical ones the default is Parent
Page
menu items. Defaults to value of name
Sorry, but no, this is not possible, due to the internal logic that WordPress applies to rendering the menu. The first submenu item is always the same as the Top level menu item (until you don’t apply a fix that avoids copying them at all – not recommended as it destroys the default behavior and messes with what the user expects and sees with the remaining menu items).
Details
You can read more about changing how menu items behave in my article here.