• Hi :]
    I am trying to put a custom font in my localhost site child theme.
    So Iv’e created the ‘fonts’ folder within the child folder and edited code.
    Even though the function was added to the fonts list, it’s just sets the default font when I choose..what am I doing wrong?

    style.css:

    @font-face {
        font-family: 'My_font';
        src: url('fonts/My_font.eot') format('eot'),
             url('fonts/My_font.otf') format('otf'),
             url('fonts/My_font.woff') format('woff');
    
    }

    functions.php:

    function ocean_add_custom_fonts() {
    	return array('My_font');
    }
    • This topic was modified 4 years, 4 months ago by meidanm95.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom font is not working.’ is closed to new replies.