本文整理自网络,侵删。
本文实例讲述了Wordpress实现单篇文章分页显示的方法。分享给大家供大家参考。具体分析如下:
很多朋友都知道Wordpress文章分页一般都会使用插件来实现的,下面我们来介绍无插件实现WordPress文章分页显示的具体方法.
1.找到wp-includes/js/quicktags.js,在其中找到下面这个javascript代码:
代码如下:
edButtons[edButtons.length]=new edButton("ed_more","more","<!–more–>","","t",-1);
在这个代码的后面加上如下代码:
代码如下:
edButtons[edButtons.length]=new edButton("ed_next","page","<!–nextpage–>","","p",-1);
2.继续在wp-includes/js/quicktags.js 中找到如下代码:
代码如下:
j.Buttons[j.Buttons.length]=new edButton(a+"_more","more","<!–more–>","","t",-1);
在后面加上如下代码:
代码如下:
j.Buttons[j.Buttons.length]=new edButton(a+"_next","page","<!–nextpage–>","","p",-1);
OK,此文件可以保存了。
3. 找到wp-includes/js/quicktags.dev.js,找到下面代码:
代码如下:
/*
edButtons[edButtons.length] =
new edButton('ed_next'
,'page'
,'<!–nextpage–>'
,"
,'p'
,-1
);
*/
去掉注释,最后是下面的样子,代码如下:
edButtons[edButtons.length] =
new edButton('ed_next'
,'page'
,'<!–nextpage–>'
,"
,'p'
,-1
);
*/
去掉注释,最后是下面的样子,代码如下:
代码如下:
edButtons[edButtons.length] =
new edButton('ed_next'
,'page'
,'<!–nextpage–>'
,"
,'p'
,-1
);
4.找到wp-admin/includes/post.php,找到下面代码:
new edButton('ed_next'
,'page'
,'<!–nextpage–>'
,"
,'p'
,-1
);
4.找到wp-admin/includes/post.php,找到下面代码:
相关阅读 >>
在wordpress中使用wp_count_posts函数来统计文章数量
wordpress升级版本及安装插件出现”problem with the ssl ca cert”的解决办法
更多相关阅读请进入《wordpress》频道 >>
相关推荐
评论
管理员已关闭评论功能...
- 欢迎访问木庄网络博客
- 可复制:代码框内的文字。
- 方法:Ctrl+C。