建站教程

建站教程

Products

当前位置:首页 > 建站教程 >

如何退出WordPress文章的全高编辑(Full-Height Editor)模式(WordPress增加返回顶部效果的方法介绍)

GG网络技术分享 2025-03-18 16:14 0


如何退出WordPress文章的全高编辑(Full-Height Editor)模式

大家一定发现,在新版的WordPress文章编辑器中采用了全高模式( Full-Height Editor)。最近,有用户反映全高模式不方便,想要退出全高模式并回到滚动条模式。这篇文章将给大家介绍如何使WordPress编辑器退出全高模式并显示滚动条。在WordPress4.0版本编辑器中,引进了一个新的写作体验。当你在编写文章时,编辑器的高度会随着你的文章的长度自动调整,从而取消了滚动跳的存在。界面如下图:

这将意味着,当你的文章比较长的时候,你必须滚动整个页面,从而回到顶部,填写你的自定义字段以及进行其他设置,比如 SEO,日历等。所以有的用户感觉这样会很麻烦,想要退出全高模式。

按照以下步骤,你可以很轻松的回到之前的滚动条模式。

打开WordPress仪表盘,在管理区选择添加一篇新文章。在文章编辑界面的右上角点击“显示选项”下拉菜单,如下图所示:

去掉“启用全高度编辑器和免打扰功能”选项前方框中的对勾。这样,编辑器将退出全高模式并在右侧出现滚动条,如下图。你还可以通过拖动编辑器右下角来调整编辑器的大小:

这篇文章就写到这里,希望对您有所帮助。

WordPress增加返回顶部效果的方法介绍

返回顶部效果不是WordPress自带的功能,这是一款js或jquery的效果,这里就来给大家介绍在WordPress中增加反回顶部效果的方法.

第一步:在下面主题文件footer.php底下加上这段代码:

<script src=\"top.js\" type=\"text/javascript\" charset=\"utf-8\"></script >
<div id=\"scroll\"><a href=\"javascript:void(0)\" onclick=\"goto_top()\" title=\"返回顶部\">TOP</a></div>

top.js代码如下:

//<![CDATA[
var goto_top_type = -1;
var goto_top_itv = 0;
function goto_top_timer()
{
var y = goto_top_type == 1 ? document.documentElement.scrollTop : document.body.scrollTop;
var moveby = 15;
y -= Math.ceil(y * moveby / 100);
if (y < 0) {
y = 0;
}
if (goto_top_type == 1) {
document.documentElement.scrollTop = y;
}
else {
document.body.scrollTop = y;
}
if (y == 0) {
clearInterval(goto_top_itv);
goto_top_itv = 0;
}
}
function goto_top()
{
if (goto_top_itv == 0) {
if (document.documentElement && document.documentElement.scrollTop) {
goto_top_type = 1;
}
else if (document.body && document.body.scrollTop) {
goto_top_type = 2;
}
else {
goto_top_type = 0;
}
if (goto_top_type > 0) {
goto_top_itv = setInterval(\'goto_top_timer()\', 50);
}
}
}
//]]>

第二步:在主题文件style.css文件中加入以下样式:

/*返回顶部*/
#scroll {display:block; width:30px; margin-right:-380px;
position:fixed;
right:50%;
top:90%;
_margin-right:-507px;
_position:absolute;
_margin-top:30px;
_top:expression(eval(document.documentElement.scrollTop));
}
#scroll a {
display:block;
float:right;
padding:9px 5px;
cursor: pointer;
background-color:#444;
color:#fff;
border-radius:5px;
text-decoration: none;
font-weight:bold;
}
#scroll a:hover {
background-color:#333;
color:#669900;
text-decoration: none;
font-weight:bold;
}

这样我们再清除缓存是不是就可以看到有个返回顶部的效果按钮了,这样你的WordPress博客中的所有页面都会有返回顶部效果了.

希望本文所述对大家的WordPress建站有所帮助。

WordPress增加返回顶部效果的方法介绍 (https://www.wpmee.com/) WordPress使用教程 第1张

标签:

提交需求或反馈

Demand feedback