Load custom icon font in site editor not working
-
Hey Joris,
First of all, great plugin!
Used the plugin in a couple of my projects already to load custom icons into my themes.
But in the block editor the custom icon previews don’t seem to show up anymore like they used to before.
See for example this image: https://dsc.cloud/443672/Scherm-afbeelding-2023-03-22-om-10.47.12.pngIn this image you can see that in the overview of all the icons there are no previews available, but within the editor itself it seems to be working fine.
(Good to know that I also enqueue my icons.css to the editor itself outside of the plugin.)
Also I had the problem that within the block editor that the font would not load except when I would add the entire url to the icon assets within the icons.css file.For example:
The original url in my icons.css was “fonts/icons.svg”, which should normally load “https://my-site.nl/wp-content/assets/icons/fonts/icons.svg”. But in the editor it tried to load “https://my-site.nl/wp-admin/fonts/icons.svg”.To solve this I added the entire url to my icons.css but I would like to know if it is possible to fix this in some way since this would not work great between staging and production.
Thanks in advance for your reply! ??
Groetjes,
Matthijs
- The topic ‘Load custom icon font in site editor not working’ is closed to new replies.