How Do I Find Fonts in WordPress?

font-family: “Helvetica Neue”, Helvetica, Arial, sans-serif; /* All other font-family declarations will be ignored */
When working with fonts in WordPress, you have a few different options at your disposal. First, you can use the built-in font-family option to set the font family for any text or element on your site.

You can also use the @font-face declaration to load custom fonts from a remote server. Finally, you can use the font-weight and font-style options to tweak the appearance of fonts on your pages.

To use the font-family option, add the following code to your theme’s functions.php file:

function mytheme_font_family() { return ‘Helvetica Neue'; }

To use the @font-face declaration, add the following code to your theme’s header.php file:

To use the font-weight and font-style options, add the following code to your theme’s style.css file:

.text { font-family: ‘Helvetica Neue’, Helvetica, Arial, sans-serif; font-weight: 300; font-style: italic; }

Finally, to use the font-weight and font-style options with a specific font, add the following code to your theme’s style.my-font-weight { font-weight: 300; } .my-font-style { font-style: italic; }

You can also use the font-family option to load custom fonts from a remote server. To do this, add the following code to your theme’s functions.php file:

function mytheme_font_url() { return ‘http://fonts.googleapis.com/css?family=Helvetica%20Neue%20%28regular%29′; }

To use the font-weight and font-style options with a specific font from a remote server, add the following code to your theme’s functions.com/css?family=Helvetica%20Neue%20%28bold%29′; }

Conclusion

In this article, you learned about the three main ways to use fonts in WordPress: using the built-in font-family option, using the @font-face declaration, and using the font-weight and font-style options. You also learned how to load custom fonts from a remote server.