Archived topic
Problems installing GeneratePress Child Theme
11 replies · Started by Raphael on September 16, 2022
Hello,
I have a problem installing the Child Theme and locally embedding the Google Fonts. I have included the CSS of all fonts used in style.css. Removed Google fonts from autoptimize and activated the child theme. Now I see on the website that the fonts are displayed differently and when checking in developer tools also appears everywhere red error.
Why is that? Would appreciate support.
Hi there,
Can you make sure you followed this instruction to add the local Google fonts?
https://docs.generatepress.com/article/adding-local-fonts/
Hello,
Thanky for the reply.
I followed the instructions of german pro´s who explains it in a complete different way than you do it. All of them. So i´m not shure if this is the way it will work for me. I cannot see, that you using the child theme for all of this.
Is there another solution?
Hi there,
if i look at your @font-face CSS on the site, the URLs are incorrect.
For example:
@font-face {
font-family: 'Montserrat';
font-style: normal;
font-weight: 100;
src: url(//manaverse.de/wp-content/themes/generatepress_child/../fonts/montserrat-v25-latin-100.eot);
src: local(''), url(//manaverse.de/wp-content/themes/generatepress_child/../fonts/montserrat-v25-latin-100.eot?#iefix) format('embedded-opentype'), url(//manaverse.de/wp-content/themes/generatepress_child/../fonts/montserrat-v25-latin-100.woff2) format('woff2'), url(//manaverse.de/wp-content/themes/generatepress_child/../fonts/montserrat-v25-latin-100.woff) format('woff'), url(//manaverse.de/wp-content/themes/generatepress_child/../fonts/montserrat-v25-latin-100.ttf) format('truetype'), url(//manaverse.de/wp-content/themes/generatepress_child/../fonts/montserrat-v25-latin-100.svg#Montserrat) format('svg')
}
every one of those URLs are incorrect.
For example this will 404:
//manaverse.de/wp-content/themes/generatepress_child/../fonts/montserrat-v25-latin-100.woff.
But if i try the correct URL it works:
https://manaverse.de/wp-content/themes/generatepress_child/fonts/montserrat-v25-latin-100.woff
Fix the URLs and it should work.
Hello,
Thank you so much for your support!
I´m happy that you found something who could cause the problem.
Unfortunately, i dont know where i find this and how i can change it.
When i was downloading the google fonts and also in the CSS is no website in the code includet.
Can you guide me through this please.
Best regards
In your original topic you said:
I have included the CSS of all fonts used in style.css.
You should find the @font-face in there ?
Hello,
Yes thats correct. But the URL is correct there?
This is what is there in the upper area:
` Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: Default GeneratePress child theme
Author: Raphael Fröschlin
Author URI: https://manaverse.de
Template: generatepress
Version: 0.1
*/
/* montserrat-100 - latin */
@font-face {
font-family: 'Montserrat';
font-style: normal;
font-weight: 100;
src: url('../fonts/montserrat-v25-latin-100.eot'); /* IE9 Compat Modes */
src: local(''),
url('../fonts/montserrat-v25-latin-100.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/montserrat-v25-latin-100.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/montserrat-v25-latin-100.woff') format('woff'), /* Modern Browsers */
url('../fonts/montserrat-v25-latin-100.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/montserrat-v25-latin-100.svg#Montserrat') format('svg'); /* Legacy iOS */
Is this the URL in your CSS?
../fonts/montserrat-v25-latin-100.eot
If so, it may not be correct.
Can you try changing all the .. to https://manaverse.de/wp-content/themes/generatepress_child?
Hello,
thank you for the tip. It worked out. But now i had to change the fonts and i have to repeat the process.
By doing this i recognized in the backend of wordpress on the child theme editor, there is an area on the right site with theme files style.css and functions.php, below that i have a button with fonts. And here are all the old ones still visable. How can i change that to the new fonts or delete it if i dont need it at all.
The files can be removed via FTP or a file manager app if your host provides one.
If you are not sure about the process, contact your host for instructions.
Hello,
thank you very much Ying.
Unfortunatly, they say, they cant help me with this. in the ftp files Fonts is none of the fonts who i see in the child-theme file.
What can i do?
in the ftp files Fonts is none of the fonts who i see in the child-theme file.
Not sure what this means. If you don't want the old fonts, you can ask your host to delete them from the child theme folder.
And you can also ask them to upload new font files for you or you can do it yourself via FTP.