Guest User

Untitled

a guest
Jan 24th, 2022
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. Hi,
  2. Depends, if the fonts are used on your website and you remove them, then this will no longer be display.
  3. But, I think that you can use a better solution, please try to preload those fonts:
  4.  
  5. <code>// Preload Newspaper fonts for responsive theme (main theme)
  6. function dns_prefetch_responsive()
  7. {
  8. echo '<link rel="preload" href="https://your-domain.com/wp-content/themes/Newspaper/images/icons/newspaper.woff?19" as="font">';
  9. echo '<link rel="preload" href="https://your-domain.com/wp-content/themes/Newspaper/images/icons/newspaper.ttf?19" as="font">';
  10. echo '<link rel="preload" href="https://your-domain.com/wp-content/plugins/td-composer/assets/fonts/open-iconic/open-iconic.woff" as="font">';
  11. }
  12. echo '<link rel="preload" href="https://your-domain.com/wp-content/plugins/td-composer/assets/fonts/font-awesome/fontawesome-webfont.woff2" as="font">';
  13. }
  14. add_action( 'wp_head', 'dns_prefetch_responsive', 0 );</code>
  15.  
  16.  
  17. Hope this code to work.
  18. Also if you are using a <a href="https://forum.tagdiv.com/the-child-theme-support-tutorial/">child theme</a>, then the code need to be set in the child theme functions.php
  19. Let me know the results!
Advertisement
Add Comment
Please, Sign In to add comment