Articles of labels

How can I use a different default admin menu icon for custom post type?

For a particular custom post type I’m setting, I simply want to change the default icon to the wordpress pages icon (menu-icon-page). I know I could upload my own pages icon and point to it, but can I just tell wordpress to use the default pages icon? Here’s what I’m using register_post_type( ‘intranet-pages’, // creates […]

How to change the label text in default setting pages?

I’ve seen various tutorials on how to modify the menu items of a WordPress Site’s admin, but I’m trying to find a tutorial or way on how to modify the actual admin page labels. Here’s what I mean: When you are in the back end and you hover over SETTINGS, and click GENERAL, a page […]

How to get the singular name of a custom taxonomy?

I have got something like this: $taxonomies = get_object_taxonomies(‘my_post_type’); foreach($taxonomies as $tax){ $args[‘labels’] = get_taxonomy_labels( (object) $args ); $args[‘label’] = $args[‘labels’]->singular_name; echo $args[‘label’]; } which gives me “Tag” each time, for post_tags but also for all the other (custom) taxonomies. How can I get the label for each $tax ? Thanks ps : by label […]

Add description text under input field for new profile fields

How can I modify my following code to add some description text under the input fields? I tried modifying it as you can see with the facebook url field but the text shows up under the field label and not the actual input field — function modify_contact_methods($profile_fields) { // Add new fields $profile_fields[‘address’] = ‘Address’; […]

get post type plural

Currently I’m trying to get the post type labels plural. In detail: $GLOBALS[‘wp_post_types’][ get_current_screen()->post_type ]->labels->name This is how I’m trying to retrieve it – in the admin UI – using the public wp API functions: $post_type_name = get_current_screen()->post_type; $post_type_obj = get_post_type_object( $post_type_name ); get_post_type_labels( $post_type_obj ); The result is the following Error: Fatal error: Cannot […]