Still does not work.
I’ve tried:
@font-face {
font-family: 'Avenir-Next-Regular';
src: url('https://MYDOMAIN/fonts/avenir-next-regular.eot');
src: url('https://MYDOMAIN/fonts/avenir-next-regular.eot?#iefix') format('embedded-opentype'),
url('https://MYDOMAIN/fonts/avenir-next-regular.woff') format('woff'),
url('https://MYDOMAIN/fonts/avenir-next-regular.ttf') format('truetype'),
}
and I’ve tried (which I thought is the correct absolute path?):
@font-face {
font-family: 'Avenir-Next-Regular';
src: url('https://MYDOMAIN/wp-content/themes/pro-child/fonts/avenir-next-regular.eot');
src: url('https://MYDOMAIN/wp-content/themes/pro-child/fonts/avenir-next-regular.eot?#iefix') format('embedded-opentype'),
url('https://MYDOMAIN/wp-content/themes/pro-child/fonts/avenir-next-regular.woff') format('woff'),
url('https://MYDOMAIN/wp-content/themes/pro-child/fonts/avenir-next-regular.ttf') format('truetype'),
}
My functions is:
function my_custom_font($data){
$data['mywebfont'] = array(
'source' => 'Custom',
'family' => 'Avenir Next Regular',
'stack' => '"AvenirNextRegular", sans-serif',
'weights' => array( '400' )
);
array_push($data, $data['mywebfont']);
return $data;
}
add_filter('x_fonts_data', 'my_custom_font');
I’ve cleared my browser cache so many times, and I have no caching plugins installed. My host does not have caching either.