最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

html - #text at the begging of every page, before the main content block

programmeradmin0浏览0评论

If you check my website (website) you can see the problem right away, I can't locate that #text anywhere ... I hope someone can help me with this frustrating problem I faced!

Don't know what else to say hopefully this is enough.

Thank you in advance !

If you check my website (website) you can see the problem right away, I can't locate that #text anywhere ... I hope someone can help me with this frustrating problem I faced!

Don't know what else to say hopefully this is enough.

Thank you in advance !

Share Improve this question edited Feb 20, 2020 at 16:07 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Feb 20, 2020 at 14:52 Алекса ЈевтићАлекса Јевтић 1033 bronze badges 5
  • 1 How are you getting the two Google Fonts into the site? It's not putting them in the head, so my first guess would be that whatever/wherever those fonts are being added, that's probably the culprit. – Tony Djukic Commented Feb 20, 2020 at 15:02
  • 1 I found it man ! It was in custom headers and footers where I added my fonts ! thanks alot ! – Алекса Јевтић Commented Feb 20, 2020 at 15:04
  • You shouldn't be adding your fonts that way either, you should enqueue them like you would any other script. I'll post an answer. – Tony Djukic Commented Feb 20, 2020 at 15:06
  • I'm not sure how to add them or any other script the right way... – Алекса Јевтић Commented Feb 20, 2020 at 15:08
  • See answer below. – Tony Djukic Commented Feb 20, 2020 at 15:13
Add a comment  | 

1 Answer 1

Reset to default 1

Since we know that the '#' was accidentally added when you were including the custom fonts from Google that's addressed, but as per the comments, here's the correct way to add these fonts so that you're not dropping them in your custom header. You want to place them in the head instead so you have to enqueue them. You'd add this to your functions.php file. The 'xx' at the end of each needs to be replaced, make that match your theme version.

function lilika_fonts() {
    wp_enqueue_style( 'arvo-font', 'https://fonts.googleapis/css?family=Arvo|Dancing+Script|Josefin+Sans|Oswald|Pacifico&display=swap', array(), 'xx' );
    wp_enqueue_style( 'kaushan-font', 'https://fonts.googleapis/css?family=Kaushan+Script&display=swap', array(), 'xx' );
}
add_action( 'wp_enqueue_scripts', 'lilika_fonts' );
发布评论

评论列表(0)

  1. 暂无评论