Home / Admin / Remove Google Font
Duplicate Snippet

Embed Snippet on Your Site

Remove Google Font

Remove Google Font

Code Preview
php
<?php
// Entfernt Google Fonts von WordPress und Breakdance 
function remove_google_fonts() {
    global $wp_styles;
    // Durch alle registrierten Styles iterieren und Google Fonts entfernen
    foreach ($wp_styles->registered as $handle => $style) {
        if (strpos($style->src, 'fonts.googleapis.com') !== false) {
            wp_dequeue_style($handle);
            wp_deregister_style($handle);
        }
    }
}
add_action('wp_enqueue_scripts', 'remove_google_fonts', 100);

Comments

Add a Comment