0

I created a custom wordpress theme from scratch
I am trying to use custom font
what I done
upload font to wp-content/themes/mythemefolder/fonts/fontfolder
in theme default style.css

@font-face {
        font-family: "fontname";
        src: url('fonts/fontfolder/fontname.otf');
}
*{font-family: "fontname";}

when I visti page text are not in desired font
I check console show error :

Failed to load resource: the server responded with a status of 404 (Not Found)  http://domainname.com/wp-content/themes/mythemefolder/fonts/fontfolder/fontname.otf 


path of font in console is correct but still font not working

what mistake I am making

thanks in advance for help

Dinesh
  • 835
  • 2
  • 17
  • 37

1 Answers1

1

You need to change the permission of the font files included on the path.

You can do that via FTP or command line tools.

Via FTP : Change the file permission via right click , it must be 644 for file and 777 for folder.

Via command line,

find your_folder_name -type d -exec chmod 755 {} \;
find your_folder_name -type f -exec chmod 644 {} \;
Ahmed Ginani
  • 6,522
  • 2
  • 15
  • 33
  • path exist in console if u click the path, font will open in application tab & permission is already 755 to folder & 644 to files – Dinesh May 11 '17 at 10:42