2

My new plugin uses the default icon set of WP in the admin-menu. That is not what I want.

How do I code within my plugin or via functions.php a specific admin menu icon that suites my needs for my plugin?

Is there a tiny code script / example to use where I can define what icon/image I want?

Also do not want to use an external plugin for this. It has to be a part of my plugin.

Hope some of you can give me a good start with this. Thanks.

3

For custom menu you can use:

<?php 

    add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); 

?>

Second last option is for the custom icon url

Here is the reference from wordpress.org, you can read more about wordpress administration menu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.