font style is not working on domain

admin2025-01-08  5

I have two domains, one /, second: /. Second domain is the one where Wordpress Adress(URL) and Domain Adress(URL) is set. First one is pointing to the directory /eu-bw.de. In my child theme stylesheet i use Font-face CSS rule to style: title, headers and navigation fonts. That rule is working with second domain but not apply to number one. Also i use this code in function.php (the file is created in child theme directory) to enqueue parent theme stylesheet in to child theme style sheet:

<?php
add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_theme_root_uri() . '/eu-bw/style.css',
        array('parent-style')
    );
}
?>

What should i change to have working fonts in both domains?

I have two domains, one http://www.eu-ohne-mpu-fs.de/, second: http://eu-bw.de/. Second domain is the one where Wordpress Adress(URL) and Domain Adress(URL) is set. First one is pointing to the directory /eu-bw.de. In my child theme stylesheet i use Font-face CSS rule to style: title, headers and navigation fonts. That rule is working with second domain but not apply to number one. Also i use this code in function.php (the file is created in child theme directory) to enqueue parent theme stylesheet in to child theme style sheet:

<?php
add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_theme_root_uri() . '/eu-bw/style.css',
        array('parent-style')
    );
}
?>

What should i change to have working fonts in both domains?

Share Improve this question asked Apr 3, 2015 at 11:23 MaciejMaciej 11 bronze badge 2
  • If you use the built in developer tools in your browser, the reason this happens is written in bright red in the error console – Tom J Nowell Commented Apr 3, 2015 at 12:21
  • After research on the problem i have found the solution stackoverflow.com/questions/2892691/… thank you very much! – Maciej Commented Apr 3, 2015 at 12:54
Add a comment  | 

1 Answer 1

Reset to default 0

Out of curiosity, are any of the fonts in this style calling a font that is hosted on an online type tool like typekit or fonts.com? If so you may need to add the other URL to your recognized websites and relaunch your online typekit.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736267620a1210.html

最新回复(0)