I created my own icon font using .svg icons and http://www.icomoon.io to create the font set.
It gave me a font folder to upload to the root directory and the css below.
I want to use these custom icons as menu icons like the font awesome functionality. However I cannot get them to display when entering the class ID in the Menus WP dashboard.
Any idea how to get this right?….
-
This topic was modified 8 years by
Bogdan B..
Ok, I have add the class to 3 of the menu items to demonstrate what happens.
It displaces the menu text and the icon does not appear… just a square box in its place. The alignment is messed up. Also it seems to have effect the menu texts font-weight.
I implemented it on 3 menu items:
Home, Heritage and Events.
please note that when I added the class the font of that particular sub-menu got changed to ‘serif’ and the font of the other sub-menus is ‘open sans’ …..even though I have set them all to Raleway (only the top level font is displaying as Raleway) – I cannot not workout why.
Hi,
I found some tutorials that could be useful to you
– https://code.tutsplus.com/tutorials/the-beginners-guide-to-icon-fonts-in-wordpress–wp-35338
– http://chipcullen.com/how-to-use-icomoon-and-icon-fonts-part-1-basic-usage/
– http://www.wpbeginner.com/wp-themes/how-to-easily-add-icon-fonts-in-your-wordpress-theme/
Also it seems the font is not loaded properly, maybe check the topics provided above and make sure everything is set right
– https://www.screencast.com/t/YDeW5KPQkYp
Thanks
Hey.. I got the font set to load… it was a file referencing issue to the fonts folder.
But I am still having an issue with alignment and the iconfont effecting the font weight of the menu text.
Thanks,
Killian
Hi,
Try this code – https://www.screencast.com/t/HYpfRhfW60M
.td-header-main-menu .td-menu-item:before {
position:relative;
top:25px;
right:10px;
}
.td-header-main-menu .td-menu-item {
margin-left: 10px;
}
.td-header-main-menu .sf-menu > li > a {
line-height: 38px;
}
Thanks