Andrea Moro
Andrea Moro

Reputation: 1031

Create custom post type wordpress: change the labels

I have registered my custom post type, but I was wondering how I can change the labels for the "all" the one that appears immediately below the title.

For instance in the Post category I have "All Posts", for Media I can see Library ... but after I have created my custom post type, my "all" item has the same name of the main one.

This is the label array I have created.

$labels = array(
    'name' => _x('Facebook', 'post type general name'),
    'singular_name' => _x('Facebook', 'post type singular name'),
    'add_new' => _x('Add New', 'Facebook'),
    'add_new_item' => __("Add New Facebook Post"),
    'edit_item' => __("Edit Facebook Post"),
    'new_item' => __("New Facebook Post"),
    'view_item' => __("View Facebook Posts"),
    'search_items' => __("Search in Facebook Posts"),
    'not_found' =>  __('No facebook posts found'),
    'not_found_in_trash' => __('No facebook posts found in Trash'), 
    'parent_item_colon' => ''
  );

By changing either the name or the Singular_name both the "Header" and the "All" menu items change. I can only suspect there is a label that is missing, but I can't find any documentation on this regard.

Any help?

Thanks

Upvotes: 0

Views: 1172

Answers (2)

Alan
Alan

Reputation: 178

Try this plugin Custom Post Type UI

Upvotes: 0

Moishy
Moishy

Reputation: 3648

use the 'all_items' label

'all_items' => 'All Facebook Posts',

Upvotes: 1

Related Questions