Problem with dashicons
-
Hi,
Plugin works good except when activated it affects some wp dashicons on admin toolbar and customizer.Some icons do not appear but some code appear in its place like for example “F223”.
It only happens when plugin activated. Can you please check this situation?
Thank you very much.
JorgeThe page I need help with: [log in to see the link]
-
Hi, I need more details:
1) WordPress version?
2) Which wp dashicons disappear? Official ones or some custom from 3rd party plugins?
3) If so, which theme/plugins are installed.I suspect that you are using custom theme/plugin, with custom font, and when you switch to Google font, they normally do not contain them.
Thank you
Additionally, it should not affect WP Dashicons font, as they are usually defined with special font CSS ::before rule like this (example):
font: 400 32px/29px dashicons;
or, alternatively, in outer div wrapper, where ‘dashicons’ font-family is explicitly specified in similar CSS ::before rule, which over-rides the plugin’s Google font.
Now, it is possible that either this is not the case as you noticed, which then should be fixed in WP core, or that some theme is using it, but without this ‘fail-safe’ wrapper/inline rule.
I need details to investigate this.
Hello, thank you for your time trying to figure it out.
I am using wordpress 4.9.8 multisite in MAMP PRO local mac.
So far I can only reproduce this issue in SEOPRESS plugin, the official ones are working ok.
I am using divi theme.
Thanks
Hi, thanks.
I have identified at least 1 icon affected in Customizer, so I think I can fix it.
Can you test this and see if it will fix your issue:1. Go to your WordPress \wp-content\plugins\admin-custom-font\css\ directory
2. Open admin-custom-font.css file with an ordinary notepad or notepad++ editor (or TextEdit / TextMate / Brackets since you’re on Mac) and replace this code at the very end of a long line:
old code:
button{font-family:"Open-Sans",sans-serif !important;}
new code:
button *:not([class="dashicons"]){font-family:"Open-Sans",sans-serif !important;}
NOTE:
replace ‘Open-Sans‘ with your actual font that you’ve selected and that is already named there.3. Save modified file.
4. Now, hit CTRL+F5 to refresh your Customizer page and see if the icons are restored. Alternatively, you’ll have to clear your browser’s cache.
* * *
About SEOPress plugin, thanks, as I’ve suspected, they are using a custom font icon, but they’ve forgot to specify font-family in their style sheet. Instead of me fixing this problem by adding exclusion to that particular plugin, please contact their support and ask them to fix this in their css simply by specifying custom font family for that particular icon. Regular WP icons are not affected by admin custom font plugin.
* * *
Thanks for taking your time to report this!
Hi,
Thanks for your time and snippet.I did as you mentioned, substituted the old code with the new one in admin-custo-font.css.
However Customizer continues not to show 2 icons in the top.
Thanks
Can you post a screenshot of those 2 icons?
Also, if you use Chrome or Firefox, can you right-click on those missing icons and click “Inspect” (or “Inspect element”) (last item in the popup menu)?
It will open a new console with highlighted line. Make a first screenshot of it (all panels).
Now, click on that highlighted blue line to expand it, look to the right of it and you will see this arrow-like pointer: ?
Next line should be :before, select it with you mouse and make another screenshot.
See example: imgur.com/Tdcnt9x
Hopefully, I’ll see what’s there.
Thank youHello,
Here are the screenshots:
imgur.com/a/wANHitr
imgur.com/a/Dlrs1OF
imgur.com/a/HBQCQwN
Thanks
-
This reply was modified 6 years, 5 months ago by
horizzons.
Thanks, strange, they should be covered by above proposed fix.
I can’t see those icons in Customizer, tried several different themes. I wonder if those are used by Divi theme specifically, and scenario is the same as with SEOPress plugin?
Anyway, can you try this code (same procedure as few posts above):
button *:not([class="dashicons"]),button *:not([class="dashicons-admin-generic"]){font-family:"Open-Sans",sans-serif !important;}
Hi,
Thanks.But icons still not appear.
Maybe I have to find another solution. Do you know a simple way to get back Open Sans font in admin?
Thank you for your effort.
Well, then it needs deeper investigation and since I don’t have Divi theme, I can’t reproduce it on my end, unfortunately. Those 2 icons are probably pulled and defined from somewhere else (theme probably), but I won’t speculate much.
This plugin is the simple method used to do this, remember? ??
There’s no simpler way than this.However, if you wish to try manual modification, you can read my blog post, where it all began:
https://tehnoblog.org/how-to-change-font-in-wordpress-admin-dashboard/
It is obsolete, since plugin now covers broader areas, but maybe you will be satisfied with it.
Regards
marking this as “resolved” (half-resolved in reality) until more details can be provided
Just to say that I’m also seeing this across the Classic Editor interface. At first I thought it was some sort of corruption and noticed that the icon codes didn’t appear in the CSS when using a browser based inspection. So I re-uploaded WordPress’s core CSS/TinyMCE related files but that did nothing.
The only way I found to fix this was to disable your plugin. I think it began with the latest WordPress release, but I’ve only noticed now when I cleared my browser cache.
-
This reply was modified 6 years, 4 months ago by
ispreview.
Ok, thanks, that’s a concrete info. I see now, problem is I already use ‘Classic Editor’ plugin, installed few months ago to prevent new editor ever being seen in the upcoming updates, which prevented me to see this problem.
I will change button styles only to default bootstrap classes, it may miss few buttons here and there, but it will be much safer now and (hopefully) avoid this kind of issues in the future.
New version will be released today after some testing.
Thank you everyone.
RegardsNew version 2.4.6 is released. You can try the new update and see if it fixes the issues.
I recommend clearing the browser’s cache after new update, just to be sure you are seeing the latest css patch (alternatively / quicker: hold CTRL + hit reload).
Thanks!
Yes that fixed it. You might want to add the ‘clear browser cache’ suggestion on the change log though, since if people don’t do that then they might well assume that it isn’t fixed even when it is.
-
This reply was modified 6 years, 5 months ago by
- The topic ‘Problem with dashicons’ is closed to new replies.