0

I have created set of icons that I want to replace Wordpress admin menu icons. I am wondering what is the best approach to force Wordpress to use my icons instead of the default?

1 Answer 1

1

One way is to use the admin_menu hook to insert CSS with your selection of menu icons (which use the DashIcons).

The googles show this recent result: https://swapnil.blog/2018/06/25/how-to-change-wordpress-admin-icons/ .

Here's some code from there; you'll just need to figure out the CSS for each menu item - use your Developer inspection tools (F12, usually) to inspect each element to find it's CSS class:

function replace_admin_menu_icons_css() {
    ?>
    <style>
        /* CSS code goes here */
    </style>
    <?php
}

add_action( 'admin_head', 'replace_admin_menu_icons_css' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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