Closed RachelRVasquez closed 5 years ago
Can you supply the relevant code snippet or snippets you've tried please?
@ntwb Here is the code below. For now I put the "dashicons-admin-site" icon instead of "dashicons-businesswoman" because it doesn't work.
$labels = [
'name' => _x( 'Careers', 'Post Type General Name', 'isda_career' ),
'singular_name' => _x( 'Career', 'Post Type Singular Name', 'isda_career' ),
'menu_name' => __( 'Careers', 'isda_career' ),
'name_admin_bar' => __( 'Career', 'isda_career' ),
'archives' => __( 'Careers', 'isda_career' ),
'attributes' => __( 'Career Attributes', 'isda_career' ),
'parent_item_colon' => __( 'Parent Career:', 'isda_career' ),
'all_items' => __( 'Careers', 'isda_career' ),
'add_new_item' => __( 'Add New Career', 'isda_career' ),
'add_new' => __( 'Add New', 'isda_career' ),
'new_item' => __( 'New Career', 'isda_career' ),
'edit_item' => __( 'Edit Career', 'isda_career' ),
'update_item' => __( 'Update Career', 'isda_career' ),
'view_item' => __( 'View Career', 'isda_career' ),
'view_items' => __( 'View Careers', 'isda_career' ),
'search_items' => __( 'Search Careers', 'isda_career' ),
'not_found' => __( 'Not found', 'isda_career' ),
'not_found_in_trash' => __( 'Not found in Trash', 'isda_career' ),
'featured_image' => __( 'Featured Image', 'isda_career' ),
'set_featured_image' => __( 'Set featured image', 'isda_career' ),
'remove_featured_image' => __( 'Remove featured image', 'isda_career' ),
'use_featured_image' => __( 'Use as featured image', 'isda_career' ),
'insert_into_item' => __( 'Insert into career', 'isda_career' ),
'uploaded_to_this_item' => __( 'Uploaded to this career', 'isda_career' ),
'items_list' => __( 'Careers list', 'isda_career' ),
'items_list_navigation' => __( 'Careers list navigation', 'isda_career' ),
'filter_items_list' => __( 'Filter careers list', 'isda_career' ),
];
$args = [
'description' => __( 'Post type to define an career', 'isda_career' ),
'labels' => $labels,
'supports' => [ 'title', 'revisions', 'thumbnail' ],
'taxonomies' => [ 'category', 'location' ],
'public' => true,
'show_ui' => true,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
'show_in_rest' => true,
'menu_icon' => 'dashicons-admin-site',
];
register_post_type( 'career', $args );
Strange, it appears to be spelt correctly:
What about businessperson
, does that work?
https://developer.wordpress.org/resource/dashicons/#businesswoman https://developer.wordpress.org/resource/dashicons/#businessperson https://developer.wordpress.org/resource/dashicons/#businessman
Nope, businessperson doesn't work either. Just business man. It is definitely strange.
On Fri, Aug 30, 2019, 4:39 AM Stephen Edgar notifications@github.com wrote:
Strange, it appears to be spelt correctly:
What about businessperson, does that work?
https://developer.wordpress.org/resource/dashicons/#businesswoman https://developer.wordpress.org/resource/dashicons/#businessperson https://developer.wordpress.org/resource/dashicons/#businessman
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WordPress/dashicons/issues/376?email_source=notifications&email_token=ACOFVPCLFRTZDE5AJY6MWOLQHDMFVA5CNFSM4IQIMOH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5Q7Y2Q#issuecomment-526515306, or mute the thread https://github.com/notifications/unsubscribe-auth/ACOFVPCQYOHADOSTELKW4UDQHDMFVANCNFSM4IQIMOHQ .
Can you double check the wp-includes/css/dashicons.css
file for the following:
.dashicons-businessman:before {
content: "\f338";
}
.dashicons-businessperson:before {
content: "\f12e";
}
.dashicons-businesswoman:before {
content: "\f12f";
}
Is your version of WordPress less than 5.2? That's when those icons were added to core.
Ah hah! That might be it - I was using 5.1.2. I'm going to upgrade and see if that resolves it @nate-allen
Yep that's what it was. It was good to upgrade anyway because of the new "site health" page added as well. Super helpful. Thanks @nate-allen @ntwb
Hi!
I'm not sure if this is the right place to report it - but it looks like the business person/woman icons were added back in 2018.
I'm currently trying to create a custom post type using one of those icons, and neither of them show as a menu icon when I set them. However if I use the businessman icon, that one works. 🤔 Is this a Dashicons issue or a WordPress issue?