How to change fonts?


Hi everyone.
I am using this method to change fonts:
I uploaded my web font kit into my child theme fold, then I put this code at the end of the functions.php:

function add_custom_font() {  
    $url = '';  
    wp_register_style('merriweather_sansregular', $url);  
$url = '';  
    wp_register_style('merriweatherregular', $url);  
$url = '';  
    wp_register_style('bebasregular', $url);  

But when I try to change font in style.css nothing happens. Am I wrong or do I have to pick another way?


Hello tergiversatore,
Add following line after the function you given above.

add_action( ‘wp_enqueue_scripts’, ‘add_custom_font’, 18 );

Let me know if this works for you.



Thank you so much, it worked perfectly! Big up, guys!


Glad to know that it works for you. :slight_smile: