Plugins may also use add_page_menu function to add an Administration Menu. And as you can see below, the book icon appears beside it. In this example, I’ve created a Custom Post Type for posting Books. 'taxonomies' => array( 'category', 'post_tag' ), 'description' => _( 'Post Type Description', 'book' ), The full length of code can be found here. Note that I’ve stripped out the code in order to keep this article shorter. You can see that the selected icon is reflected on the header and it displays the icon’s name with options to copy it in several formats: CSS, HTML, and Glyph.Ĭopy the icon’s name, and add it in the menu_icon of your Custom Post Type function, like so. In version 3.8, this parameter can also be used to declare the icon from Dashicons.įirst, visit Dashicons website. Prior to WordPress 3.8, you can add your image icon path in it. Custom Post Type uses menu_icon to display the icon. Recommended Reading: Customize WordPress Admin Color Scheme Dashicons in Administration MenuĪssuming that you incorporate Custom Post Type into your theme or plugin, you can use Dashicons in the following way. If you are a developer who want to update your plugins or themes, according to the latest WordPress design as well as using its new properties, this article is definitely for you. By using a font icon set, like Dashicons, you can easily customize the output through CSS. Dashicons is a font icon designed by Mel Choyce that was created primarily to accommodate the new WP-Admin UI, from the Content Screen Editor to the Administration Menu, as you can see in the screenshot below.Īs WordPress now uses it to deliver icons in WP-Admin, you should also use it in your themes and plugins. Along with the revamped WP-Admin, WordPress 3.8 also brought a set of brand new icons called Dashicons.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |