Skip to content

Instantly share code, notes, and snippets.

@DxDiagDx
Created May 23, 2022 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DxDiagDx/6e38244c40a7595494133db6210f0a44 to your computer and use it in GitHub Desktop.
Save DxDiagDx/6e38244c40a7595494133db6210f0a44 to your computer and use it in GitHub Desktop.
WP StoreFront: как добавить Google Fonts
/* Меняем шрифт на Google Fonts */
add_action( 'storefront_header', 'add_google_fonts_storefront_header', 40 );
function add_google_fonts_storefront_header() {
?>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,200;8..144,300;8..144,400;8..144,500;8..144,600&display=swap" rel="stylesheet">
<?php
}
h1, h2, h3, h4, h5, h6, body, button, input, textarea {
font-family: 'Roboto Flex', sans-serif;
}
body, button, input, textarea {
font-family: 'Roboto Flex', sans-serif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment