Step 2 is to enqueue the stylesheet resource. Google Fonts gives you what to enqueue.
Where do you put this into your WordPress website? You will use the WordPress function
wp_enqueue_style. Let’s talk about what this function does.
What if you need to load up more than one Google Fonts? What is the syntax? You use the pipe
| to separate out each of the font families.
Let’s dig into the enqueuing and write the code for it. Don’t worry, as it’s very easy. You are actually writing PHP code here, even though it’s very little. It’s still PHP.
Psst….here is the version control lab that I mention in this episode. Go take this lab too, as it will show you the why.I learned how to add Google Fonts in #WordPress by customizing code in both CSS and PHP. Click To Tweet
Excellent job! You now know that there are two steps to add a new Google Font to your WordPress website. Way to Go!
There’s a time to code and …. yup, that sums it up.
Total Lab Runtime: 00:18:35