WordPress.org

Ready to get started?Download WordPress

Forums

Epic
Remove GoogleWebFonts (3 posts)

  1. Max Mustermann
    Member
    Posted 1 month ago #

    Hi i am using the epic theme and would like to know how to disable all googleapis.font calls inside the theme.
    I was playing arround with the header.php, Epic.php, function.php and some plugins but nothing really helped. I still get calls from google concerning the Open Sans fonts.
    Could you please tell me where you refer to the webfonts.url inside the theme ?
    Thank you in advance :D

  2. Slocum Themes
    Member
    Theme Author

    Posted 1 month ago #

    Hi Max,

    You may want to try hooking into the wp_enqueue_scripts action and using wp_dequeue_script() to remove the 'open-sans-web-font' stylesheet that we are enqueuing.

    Thank You!

  3. Max Mustermann
    Member
    Posted 1 month ago #

    I tried to integrate the following functions into the functions.php of my child theme, but sadly they don't work.

    wp_dequeue_script('open-sans-web-font');
    wp_dequeue_script('open-sans-web-font-css');
    wp_dequeue_style('open-sans-web-font');
    wp_dequeue_style('open-sans-web-font-css');

    Are you sure that 'open-sans-web-font' is the matching script name ?

    I heard about another solution but i'm not sure how to use it in this specific case.
    Could it be the solution ?

    function remove_inline_style() {
    	remove_action('wp_head', 'epic_header_style');
    	remove_action('wp_head', 'epic_admin_header_style');
    	remove_action('wp_head', 'epic_fonts');
    }
    
    add_action('init', 'remove_inline_style');

    I don't realy know what i have to write between the quotation marks(instead of 'epic_fonts')
    Could you help me with that ?
    That would be very nice ;)

Reply

You must log in to post.

About this Theme

About this Topic