• Resolved Paul

    (@pawelszroeder)


    Hi! My theme has manually added script for Google Fonts in footer. Does plugin support to change it to local or it is only for google fonts from other plugins etc.?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author EverPress

    (@everpress)

    Hi Paul!

    It depends how the theme includes the font style. If it uses wp_enqueue_style LGF should work. Best to try it on your own.

    Regards

    Thread Starter Paul

    (@pawelszroeder)

    Standard way by:

    <link rel="stylesheet" type="text/css" href="https://domain.com/wp-content/themes/mytheme/css/style.min.css" />

    ..and it your plugin doesn’t work here ??

    • This reply was modified 2 years, 4 months ago by Paul.
    Plugin Author EverPress

    (@everpress)

    This is not a Google font stylesheet so LGF will ignore it.

    Thread Starter Paul

    (@pawelszroeder)

    But this stylesheet is calling Google font.
    …and Google font stylesheet is included in footer.php:

    `<link href=”https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700&subset=latin-ext&#8221; rel=”stylesheet”>”

    ..and it is not visible for your plugin.

    Plugin Author EverPress

    (@everpress)

    This is hard coded as well. Please remove this line from your theme files and add this to your themes function.php:

    function my_custom_font_16212538() {
    	wp_enqueue_style( 'my-custom-font', 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700&subset=latin-ext&#8221' );
    }
    add_action( 'wp_enqueue_scripts', 'my_custom_font_16212538' );

    Later check the settings page of LGF to load them locally.

    • This reply was modified 2 years, 4 months ago by EverPress.
    • This reply was modified 2 years, 4 months ago by EverPress.
    Thread Starter Paul

    (@pawelszroeder)

    thanks, it works

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘google fonts added manually to theme’ is closed to new replies.