• Resolved McCologne

    (@mccologne)


    For my customizations I use a child theme which works very well. Now, unfortunately, I tried in the backend via Design > Customize > Global Settings > Google fonts some other fonts, which cannot be disabled. When I check the CSS in Firefox, I have next to the original CSS “bluemin.css” and my own “style.css” now some “inline”-rules, which override my child-theme-CSS.

    How can I disable these inline changes and disable the Google fonts in theme customizations?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter McCologne

    (@mccologne)

    Hi, is there no solution? Where are the changes “customizr-skin-inline-css” saved? When I view page source, I find the css code, but where it comes from?

    If I knew that, I would restore this file from my backup.

    Thanks in advance!

    You can use stronger rules.
    Also, what font do you use?

    BTW, adding this to your child-theme functions.php:

    add_action('after_setup_theme', 'remove_gfonts_inline');
    function remove_gfonts_inline(){
        remove_filter('tc_user_options_style', array(TC_resources::$instance,'tc_write_fonts_inline_css'));
    }

    should do the trick.

    edit:
    wrong action/filter, snippet modified.

    Thread Starter McCologne

    (@mccologne)

    Thank you d4z_c0nf!

    I’ve tried the proposed addition to the functions.php, but it does not work. In theme-customizations > Global Settings > Google fonts “Droid Sans” is set. This is best suited to my site in which this font is used in the text.

    For page title and headings I use “Droid Serif”. For that I have to do in the style.css of my child-theme these supplements:

    .site-title, .site-description, h1, h2, h3 {
         font-family: "Droid Serif";
         font-weight: 400;
    }

    My own style.css now overrides the Google font settings from the theme customizations. So I achieve the desired result, but it is a detour. The main problem: Sourcecode of my pages shows up this line:

    <style id = 'customizr-skin-inline-css' type = 'text / css'>

    I would like to remove this. Is there no way?

    Edit: Tried your modified snippet, it does the work! Thank you. Nevertheless: How can I prevent that inline-code ‘customizr-skin-inline-css’ is ever written in the source code?

    Yeah, sorry, the first snippet was wrong ??
    Why do you want that? It’s useful for other things, such as sliders sticky header and more…
    Think twice about it and if you’ll still want it let me know.

    p.s.
    meantime could you mark this topic as resolved?

    Thread Starter McCologne

    (@mccologne)

    Thanks again, I will think about it. Topic resolved.

    Hi, just came across your topic because I was looking for the same answer… And finally managed to find the way how to disable it.

    Go to class-fire-init.php on line 178 and delete or comment:

    $this -> font_selectors     = array(
                'titles' => implode(',' , apply_filters( 'tc-titles-font-selectors' , array('.site-title' , '.site-description', 'h1', 'h2', 'h3', '.tc-dropcap' ) ) ),
                'body'   => implode(',' , apply_filters( 'tc-body-font-selectors' , array('body' , '.navbar .nav>li>a') ) )
              );

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Google Fonts can't be disabled?’ is closed to new replies.