• Resolved grandesballo

    (@grandesballo)


    Hello,
    I’m really enjoying this theme, but I’d like to use the fonts you chose for the HOFFMAN theme because they suit best the subject of my future blog.
    If I’m not wrong I will need Raleway and Vollkorn.

    I searched Lovecraft theme files to see what method you used to import Google Fonts (i guess enqueue or import), but I can’t find the code and I’m not sure what to edit (actually, I’m using a child theme, so I will need to add them in a separate file, I guess).

    The only reference to fonts that I have found is in functions.php, in the ENQUEUE STYLE section, but the code is obscure to me and very different from the implementation of wp_enqueue_style suggested in some tutorials that I have read.

    I’d love to know how to change the fonts without breaking the theme.

    Thank you

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Well, it is going to be a bit tricky to change the fonts for the theme, but it is doable.

    First of all you need to create a child theme and then, on the functions.php file of the child theme, define a new lovecraft_load_style function, where you define what you need.

    Usually you need to copy and paste the code and change where it says ‘//fonts.googleapis.com/css?family=Lato:400,700,900|Playfair+Display:400,700,400italic’ to what you need.

    But that is just the first step, as then you need to search in the style.css file for all the definitions that have the font-family rule. Then copy all of them into the child style.css file and change the rule to reflect the fonts you want and where.

    Can be tricky, but is doable.

    Thread Starter grandesballo

    (@grandesballo)

    Thank you @kadaicross , that seems to be exactly what I was looking for.
    I don’t know PHP, so I wasn’t sure what the function was doing.

    I understand some CSS and it’s not a problem searching for the classes that needs to be changed, it will just be a matter of time I guess.

    The problem I had was to understand where PHP was loading the fonts, and I think you answered that.
    Thank you!
    I will try and keep you posted.

    Thread Starter grandesballo

    (@grandesballo)

    Just wanted to say thanks to @kadaicross , his solution worked!

    hehe, yeah, glad it helped!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change fonts manually without plugins’ is closed to new replies.