Quantcast
Channel: Toby Cryns – The Mighty Mo! Design Co. LLC
Viewing all articles
Browse latest Browse all 46

Custom Icons in Your WordPress Custom Post Type Using Dashicons

$
0
0

There’s a new feature that slipped into the admin side of WordPress with the recently-released 3.8 – Dashicons!  Very similar to Font Awesome, Dashicons give plugin developers a nice set of pre-made icons to use.  The cool thing is that Dashicons come pre-loaded, and using them in your WordPress custom post types is as simple as adding a parameter to your register_post_type() function, like so:

// Register a new custom post type named "Portfolio"
register_post_type('portfolio', array(
 'public' => true,
 'menu_icon'=> 'dashicons-portfolio',
 'label' => __( 'Portfolio', 'local' ),
);
[source]

Here’s a screengrab from our Lowrize plugin using Dashicons:
dashicon example

Pretty nifty, eh?!

The post Custom Icons in Your WordPress Custom Post Type Using Dashicons appeared first on The Mighty Mo! Design Co. LLC.


Viewing all articles
Browse latest Browse all 46

Trending Articles