Web Development

How to add own custom font without the help of plugins in wordpress or any sites.

Here I am sharing the small procedure about how to use own custom font without the help of plugins in wordpress site. This procedure can be used for any type of sites or platform.

Here are the steps:

  1. At first upload your choiceable font ( which you want to use in the site ) in the root directory using ftp or through cpanel. I have attached screenshot for better understanding

2) Put the css below in your style.css or custom css portion ( please change the url in the code as per your site url)

@font-face {
	font-family: "myfont";
	font-display: Swap;
	font-weight: Normal;
	font-style: Normal;
	src: url("https://yoursiteurl.com/myfont.ttf");    


3) so you are done, but to use the font using css, you need to use css similar to this

article, article * ,.entry-content,.entry-content *{
    font-family: "myfont";

Feel free to let me know if you have any question regarding this.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s