-
AuthorPosts
-
October 14, 2018 at 11:38 pm #1021317
Hello,
I had to use a specific font for my website headers called ‘KG All of Me’ so I use a plugin that was recommended on some of the forums called ‘Use any font’. The host I’m using is a multi-site so I figured this would be the easiest way to do it.
I installed the plugin and uploaded the .ttf font and then added the css in to the admin section in Enfold:
h1, h2, h3, h4, h5, h6, .menu-item a {
font-family: KGAllofMe!important;
}The font now works great on the desktop now but I just checked on the mobile and it is defaulting to a font which looks nothing like KG All of me.
I am hoping you know an easy way to fix this for me?Thank you
JoeOctober 15, 2018 at 6:12 am #1021403Hey Joe,
The font is not loading at all on my end, did you install the font locally on your machine? If so it might be working on your local machine since it’s installed there. Did you make sure that the name of the font is correct in your CSS? Also, did you try to import it using CSS rather than using a plugin?
Best regards,
RikardOctober 15, 2018 at 6:11 pm #1021695Hi Rikard,
I downloaded the font on to my machine as a ttf then uploaded it from my desktop via the plugin in the wordpress admin section. I copied and pasted the css along with the font name so I assume it was done correctly as it worked ok after I’d done this but if it’ not working your end or on my phone then it must be working locally and thats not what I’m after.What is the correct way to do this using css? I can delete the plugin and css I used and try again using a different method if you know a better way?
Thanks
JoeOctober 16, 2018 at 5:28 am #1021961Hi Joe,
Ok, thanks for the feedback. Maybe the plugin you are using is not working, could you try importing the font manually using CSS maybe? You can find instructions on how to do it here: https://www.w3schools.com/css/css3_fonts.asp
Best regards,
RikardOctober 16, 2018 at 1:50 pm #1022187Thanks Rikard,
Ok, so I’ve deleted the plugin and css and started again but I can’t get it to work, maybe you can check what I’ve done and let me know what I might have done wrong?
I converted the kgallofme.ttf font with font squirrel and this created woff and woff2 files so I uploaded these to a ‘fonts’ folded in a child theme on my main site (link below). I then added the following code to the top of the Quick css box in the enfold general styling section.
@font-face {
font-family: ‘kgallofme-webfont’;
src: url(‘https://gettopageone.com/wp-content/themes/enfold-child/fonts/kgallofme-webfont.woff2’) format(‘woff2’),
url(‘https://gettopageone.com/wp-content/themes/enfold-child/fonts/kgallofme-webfont.woff’) format(‘woff’);
font-weight: normal;
font-style: normal;
}h1, h2, h3, h4, h5, h6, .menu-item a {
font-family: kgallofme-webfont.ttf!important;
}Hopefully this is somewhere close and an easy fix?
Thank you.October 17, 2018 at 4:27 am #1022518Hi,
1. This URL leads to a 404 page, please check it: https://gettopageone.com/wp-content/themes/enfold-child/fonts/kgallofme-webfont.woff2
2. The font family is the same as this: font-family: ‘kgallofme-webfont’;. Remove the file ending in your code.
Best regards,
RikardOctober 17, 2018 at 10:31 am #1022668Thanks Rikard,
I have moved the fonts and the URL to the font seems ok now and I’ve changed my css to this however the font still doesn’t see to load on the webpage. Any ideas? Thanks.@font-face {
font-family: ‘kgallofme-webfont’;
src: url(‘http://engageyourbrand.co.uk/wp-content/themes/enfold-child/fonts/kgallofme-webfont.woff2’) format(‘woff2’),
url(‘http://engageyourbrand.co.uk/wp-content/themes/enfold-child/fonts/kgallofme-webfont.woff’) format(‘woff’);
font-weight: normal;
font-style: normal;
}h1, h2, h3, h4, h5, h6, .menu-item a {
font-family: kgallofme-webfont;
}October 18, 2018 at 4:43 am #1023119Hi,
Thanks for that. Everything seems to be correct and I can see your CSS applying, though your SSL certificate seems to be the problem now. I haven’t seen this happen before so I’m not really sure how to fix it. Maybe this will help? https://www.drivereasy.com/knowledge/fix-err-cert-common-name-invalid-chrome-solved/
Best regards,
RikardOctober 18, 2018 at 10:15 am #1023241Hi Rikard,
Thanks for that information, it’s really helpful.
The sites will eventually have SSL certificates so I will wait until then to see if the font applies.
Thanks for your help.
JoeOctober 18, 2018 at 1:35 pm #1023350Hello again, actually please could you check this again?
The web site here is now live and secure.
The css is below and link to the font is on a secure site.
Everything seems ok now but the font still doesn’t work? Any other ideas?
Thanks@font-face {
font-family: ‘kgallofme-webfont’;
src: url(‘https://gettopageone.com/wp-content/themes/enfold-child/kgallofme-webfont.woff2’) format(‘woff2’),
url(‘https://gettopageone.com/wp-content/themes/enfold-child/kgallofme-webfont.woff’) format(‘woff’);
font-weight: normal;
font-style: normal;
}h1, h2, h3, h4, h5, h6, .menu-item a {
font-family: kgallofme-webfont;
}October 19, 2018 at 5:12 pm #1024049Hi,
Where did you add the css code? The headings are still using the theme font, currently set to “Lato”.
h1, h2, h3, h4, h5, h6, #top .title_container .main-title, tr.pricing-row td, #top .portfolio-title, .callout .content-area, .avia-big-box .avia-innerbox, .av-special-font, .av-current-sort-title, .html_elegant-blog #top .minor-meta, #av-burger-menu-ul li { font-family: 'Lato', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
Best regards,
IsmaelOctober 19, 2018 at 6:27 pm #1024163Hi Ismael,
Thanks for getting back to me, that’s interesting. The css code is pasted in to the Quick css box in the admin section of Enfold.
Do you think the css below is wrong or not applying?
@font-face {
font-family: ‘kgallofme-webfont’;
src: url(‘https://gettopageone.com/wp-content/themes/enfold-child/kgallofme-webfont.woff2’) format(‘woff2’),
url(‘https://gettopageone.com/wp-content/themes/enfold-child/kgallofme-webfont.woff’) format(‘woff’);
font-weight: normal;
font-style: normal;
}h1, h2, h3, h4, h5, h6, .menu-item a {
font-family: kgallofme-webfont;
}Thanks
JoeOctober 22, 2018 at 3:57 am #1024656Hi,
Why do you access the font from another site? It’s causing a cross origin issue. (see private field)
This might help: https://kriesi.at/documentation/enfold/icon/#icons-are-showing-as-rectangular-boxes-
Or just upload the font to the “sportsbarnorthernquarter” site.
Best regards,
IsmaelOctober 23, 2018 at 6:07 pm #1025530Hi Ismael,
Thanks a lot for this, as it’s set up on a multi-site the easiest option was for me to change the .htaccess file and the header fonts all seem to work as I’d like now.
One last thing, the menu fonts for Home | About | Services | Contact are still in the wrong font. Is this because the code below is wrong?
h1, h2, h3, h4, h5, h6, .menu-item a {
font-family: kgallofme-webfont;
}Thanks for your help.
JoeOctober 24, 2018 at 3:09 am #1025746Hi,
Thanks for the update. Try this css code for the main menu.
#top .header_color .main_menu ul> li > a { font-family: kgallofme-webfont; }
Best regards,
IsmaelOctober 24, 2018 at 10:29 am #1025842Hi Ismael,
I cut and pasted the code in to the top of the css box but it didn’t seem to work.
I added it on to this website:I would also like to change the body copy to be the KG font also.
Thanks
JoeOctober 24, 2018 at 2:50 pm #1025918Hi,
The font is set to “Special Elite”. Please remove this css code.
#top #header .av-main-nav > li { font-family: Special Elite; }
And upgrade the theme to version 4.5.
Best regards,
IsmaelOctober 24, 2018 at 4:16 pm #1025961Thanks for your Ismael, all is working now.
Much appreciated!October 25, 2018 at 1:56 pm #1026348Hi,
Great! Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
Don’t forget to bookmark Enfold Documentation for future reference.Thank you for using Enfold :)
Best regards,
Ismael -
AuthorPosts
- The topic ‘use-any-font.5.0’ is closed to new replies.