Remove Google Fonts from parent theme (Accelerate)

Question

As Buttered_Toast mentioned, I think the hook you want to use is wp_enqueue_scripts rather than after_setup_theme. Changing the priority is also a good idea to make sure your function trigger after the initial call from the parent theme.

So your function would be:

/**
 * Remove Accelerate Google fonts
 */
function remove_accelerate_google_fonts() {
    wp_dequeue_style( 'accelerate_googlefonts-css' );
    wp_deregister_style( 'accelerate_googlefonts-css' );
}
add_action( 'wp_enqueue_scripts', 'remove_accelerate_google_fonts', 50);

0
winnewoerp 1 month 2022-10-27T03:53:04-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse