[Theme: Blaskan] Using Google web fonts
-
Me again,
Hopefully I’m getting all the technical terms right: I’m trying to make just a few typographical changes to the Blaskan theme on my blog, https://www.kunjulam.com. These include
– adjusting the body type size (from 15 to 13 in the stylesheet).
– changing fonts to Lora for all body copy and Josefin Sans for all the h areas.
So far, the only change I’ve made that’s taken effect is the styling of my links (#FC673B with no underline) in my child theme’s style.css.From a few different tutorials, I gathered that the most effective way to add fonts is to place them in functions.php, rather than mess with the head. The only functions.php code that came with the boilerplate child theme was this
<?php
and uploading that file with the rest of the child theme contents led to a parse error message. Jan Dembowski kindly suggested I remove the file completely, which allowed me to activate the child theme in the first place.Here’s the code I created in the functions.php of my child theme to integrate new typefaces. I copied what Per used for League Gothic and adapted it to my choices: https://pastebin.com/atpqqmPS
Now when I upload this functions.php file I’m getting this error message: Parse error: syntax error, unexpected T_IF in /home/seethas/public_html/kunjulam.com/wp-content/themes/blaskanchild/functions.php on line 12
So I’ve removed the functions.php for now. I know I’m doing something wrong because adding Google web fonts shouldn’t be this difficult. I’ve also tried doing it this way:
<?php function load_google_fonts() { wp_register_style('googleWebFonts', 'https://fonts.googleapis.com/css?family=JosefinSans|Lora'); wp_enqueue_style('googleWebFonts'); } add_action('wp_print_styles', 'load_google_fonts'); ?>
But that makes for an anonymous function, right?
In short, I’d thoroughly appreciate any suggestions for implementing code (wherever it may have to be) in my Blaskan child theme that will allow me to use Josefin Sans and Lora, and to change the body type size. Again, sorry for my extremely basic/newbie questions. Thanks in advance for your amazing help!
- The topic ‘[Theme: Blaskan] Using Google web fonts’ is closed to new replies.