• Resolved bagstage

    (@bagstage)


    Hi there, i like to disable the “Roboto Google Font” in our Ample theme. I found several tutorials to do this with “dequeue”. I tried it with the following code but it do not work …

    add_action(‘wp_print_styles’, ‘ample-google-fonts_dequeue_styles’);

    function ample-google-fonts_dequeue_styles() {
    wp_dequeue_style( ‘ample-google-fonts’ );}

    any help? Regards …

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    The function name should include ‘_’ not ‘-‘. Can you change the function name to ample_google_fonts_dequeue_styles and check?

    Thanks.

    Thread Starter bagstage

    (@bagstage)

    Hi,

    if i use this code:

    add_action('wp_print_styles', 'ample-google-fonts_dequeue_styles');
    
    function ample_google_fonts_dequeue_styles() {
    wp_dequeue_style( 'ample-google-fonts' );}

    i get this error:
    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘ample-google-fonts_dequeue_styles’ not found or invalid function name in /…/wp-includes/class-wp-hook.php on line 286

    Thread Starter bagstage

    (@bagstage)

    Hi, sorry, now it works with this code:

    add_action(‘wp_print_styles’, ‘ample_google_fonts_dequeue_styles’);

    function ample_google_fonts_dequeue_styles() {
    wp_dequeue_style( ‘ample-google-fonts’ );}

    Thanx a lot!

    Hi,

    Glad to know it worked. Feel free to ask again if you get any issue regarding the theme. If you liked this theme, you can help us by leaving a review.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to deactivate Roboto Google Font in Ample Theme?’ is closed to new replies.