【发布时间】:2018-05-15 10:12:53
【问题描述】:
我正在使用 271 主题,并且当我插入 < head > 时有一个不寻常的空白区域。已查看 wordpress.org 支持,但没有任何答案解决了我的问题,并且已经在此问题上进行了广泛的搜索。
如果我删除 < head >< /head > 它会消失但头部只有一个标题,那么为什么它有所有 < br >s (见第二张图片)和产生的空白?我只是想删除空白,或者至少减少它,这是我迄今为止尝试过的:
.site-content .entry-content {display: none;}
.site-content .entry-header {display: none;}
.site-content .entry-title {display: none;}
但这些都不能解决问题。
这是我的 HTML
<!DOCTYPE html>
<html>
<head>
<title class= "title-class">Single Column Template</title>
</head>
<body>
<header>Interested in our website and technology reviews? Want further?
Submit the form below.</header>
<main>
omitted as irrelevant info
</main>
<footer></footer>
</body>
</html>
这只是我从未放入过自己的带有 br 的 Head 位。不知道发生了什么。
【问题讨论】:
-
你在结构上破坏了一些东西。这段代码要去哪里?这是被插入到模板中吗?如果您查看源代码而不是使用开发工具,您会得到什么?看起来
<head>部分正在插入<body> -
是的,就是这样。谢谢乔恩。固定的。我删除了头部标签。我对在 wordpress 中实现 head 部分的最佳方式缺乏了解。欣赏评论。