custom icon for custom post type in wordpress !

custom icon wp

To add custom icon for custom post type .. you can use this function for that..

// Add this to functions.php file..

When you are going to create custom post type then by default icon code will be like this..

'menu_icon' => 'dashicons-cart',

 
You can also add the full URL of an image file you want to display as icon, like this: you can change path..
 
'menu_icon' => 'http://www.nstplaent.com/wp-content/uploads/2017/04/nst-icon.png',

 
You can upload image with size around 22 x 22 and upload there in dashboard media or in theme images folder.

 
Also can adjust or align icon by using admin css function.

 
admin css icon aligned

 

If this help you then.. Can you buy a Cup of Coffee for me by nst webcreation paypal--OR-- nst webcreation blog coffee cup

Published by

NST

Myself Narender Singh Thakur ( NST ) and i share my Experience/Knowledge and Tricks for folks and beginners to solve their issues while making websites through this Planet.

Related Articles

One thought on “custom icon for custom post type in wordpress !”

Leave a Reply

Your email address will not be published. Required fields are marked *

Click to Chat