• Resolved claudiof1

    (@claudiof1)


    Greetings,

    So I am hosting my fonts locally and need to remove the templates fonts. I have tried the following code below in my custom functions plugin, but it did not work. Any suggestion on how to resolve this.

    Thank you.

    add_action( ‘wp_enqueue_scripts’, function() {
    wp_dequeue_style( ‘font’ );
    }, 99 );

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Afterimage Designs

    (@afterimagedesigns)

    Hi claudiof1,

    You can remove the font by adding a code like this in your functions.php file but I recommend this adding in your child theme

    function wpbs_dequeue_fonts() {
        /*wp_dequeue_style( 'fontID-you-want-to-remove' );*/
        /*Sample*/
        wp_dequeue_style( 'wp-bootstrap-starter-poppins-lora-font' );
        
    }
    add_action( 'wp_enqueue_scripts', 'wpbs_dequeue_fonts', 20 );
    Thread Starter claudiof1

    (@claudiof1)

    Greetings and thank you for the quick reply.

    So I inserted the above code into my child theme functions.php (see the link), and after inspecting my page, the template fonts are still showing up. I presume I’m doing this wrong – any advice would be apprecitated.

    https://s6.postimg.org/qhgovvkhd/Screen_Shot_2017-09-27_at_10.01.37.png

    Thank you.

    Thread Starter claudiof1

    (@claudiof1)

    OK, stupid me – the code you provided did remove the fonts.
    The fonts showing up on Safari inspector were from a plugin.
    Sorry to have wasted your time.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing template Fonts’ is closed to new replies.