Enqueue the Stylesheet Resource
Lab: Adding Google Fonts to Your WordPress Website
Video Runtime: 09:57
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. Share on XYou Rock!
Excellent job! You now know that there are two steps to add a new Google Font to your WordPress website. Way to Go!
Don’t repeat yourself. Don’t repeat yourself. Don’t repeat yourself.
Episodes
Total Lab Runtime: 00:18:35
- 1 Google Fonts and Your CSSfree 08:38
- 2 Enqueue the Stylesheet Resourcefree 09:57