![Image [1]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250328090932857-image.png)
This article introduces three common ways to import WordPress fonts, adapting to different theme types and operating habits.
Preparing the font file
Commonly used web font formats include .woff
,.woff2
,.otf
,.ttf
respond in singing .eot
. Among them .woff2
High compression and compatibility for most modern browsers.
![Image [2]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250328103159121-image.png)
If the font format does not meet the requirements for use, it can be converted in an online tool such as Transfonter.org. It is recommended that you also download .woff
respond in singing .woff2
two formats to enhance compatibility.
Method 1: Upload fonts using the site editor (for WordPress 6.5+)
WordPress 6.5 adds font upload feature, requires block theme to be enabled.
The operation path is as follows:
- Go to "Appearance > Editor"
![Image [3]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250327173007932-image.png)
- Open the "Style" setting in the upper right corner and click "Typography".
![Image [4]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250328142910743-1743143216755.jpg)
- Select "Manage Fonts" and click "Upload Fonts".
![Image [5]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250327173201334-image.png)
- Selecting a local font file (supported)
.woff
,.ttf
(etc.)
- After uploading, you can select the corresponding font in the site layout settings
![Image [6]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250327173254879-image.png)
This method does not useplug-in (software component)or code interventions, it's simple. To use Google Fonts, click "Installation of fonts", search for Google Fonts fonts and add them with one click.
Method 2: Use plugin to import fonts (applies to all themes)
If the site is not using the block theme or if you want to make it more intuitive, you can do so with theplug-in (software component)Enables font import.
Recommended Plugins:
- Use Any Font: Support for uploading local fonts
- Easy Google Fonts: suitable for quick access to Google Fonts
utilization
- Install and enable the plugin
![Image [7]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250327173434728-image.png)
- Go to the plugin settings page to request and verify the API Key
![Image [8]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250327173533821-image.png)
- Upload the font file and name it
![Image [9]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250327173601446-image.png)
- After a successful font upload, it will appear in the site layout menu
![Image [10]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250327173649836-image.png)
![Image [11]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250327173725917-image.png)
The plugin approach is suitable for most sites and is easy to set up, with or without a code base.
Method 3: Manually import fonts using a child theme (for users with code experience)
Font import can be achieved through child themes if higher degrees of freedom are needed or if a plugin-independent approach is desired.
The steps are as follows:
- exist
/wp-content/themes/
Create a sub-theme folder under
![Image [12]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250328090314588-image.png)
![Image [13]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250328090354226-image.png)
- increase
style.css
respond in singingfunctions.php
file that defines the theme information and introduces the parent theme styles
![Image [14]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250328090601581-image.png)
- establish
fonts
folder and upload the font file
![Image [15]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250328090447420-image.png)
![Image [16]-WordPress font import tutorial: three ways to achieve website custom fonts](https://www.361sale.com/wp-content/uploads/2025/03/20250328090531345-image.png)
- exist
style.css
Add the following CSS to load your locally uploaded custom fonts. :
@font-face {font-family: 'CustomFont'.src: url('fonts/CustomFont.woff2') format('woff2'),font-weight: normal;font-style: normal; }}body {font-family: 'CustomFont', sans-serif; } body { font-weight: normal; font-style: normal}@font-face { font-family: 'CustomFont'. src: url('fonts/CustomFont.woff2') format('woff2'), font-weight: normal; font-style: normal; } } body { font-family: 'CustomFont', sans-serif; } body { font-weight: normal; font-style: normal }@font-face { font-family: 'CustomFont'. src: url('fonts/CustomFont.woff2') format('woff2'), font-weight: normal; font-style: normal; } } body { font-family: 'CustomFont', sans-serif; } body { font-weight: normal; font-style: normal }
- Go back to the WordPress backend and enable the child theme.
This method is suitable for users with a certain technical base and allows for more flexible control and customization.
summarize
Custom fonts help to build a uniform style of website typography. The task of replacing fonts can be accomplished using a site editor, plugin, or manually. Choosing the right method to do this, taking into account the theme of the site and your own needs, will help improve the overall visual effect and the expression of information.
Link to this article:https://www.361sale.com/en/47768
The article is copyrighted and must be reproduced with attribution.
No comments