Adding custom fonts without coding
Adding custom fonts without coding
Up until WordPress 6.5.4 when you wanted to add a custom font to the current theme you could do so via the Create Block Theme plugin which would place the relevant font file in the theme inside /assets/fonts folder. There was also this plugin which I have never used but assume works in a similar way. Core Gutenberg now has this function, and as a result the Create Block Theme plugin has dropped it from functionality.
To upload a custom font now you would go to
=>Appearance
=> Editor
=> Styles
=> Typography
=> Click on adjust icon (manage fonts)
=> this modal will display
“To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts. You can alternatively upload files directly on the Upload tab.”
– from the modal
The fonts will then be uploaded into the WordPress installation in this folder: /wp-content/uploads/fonts
and NOT inside of the theme.
This has the advantage of keeping the new font available in the site regardless of the theme but could change how fonts are ultimately treated in a theme.
To find out more about this from someone who knows more than me read this article by Justin Tadlock