最新文章栏出现分页后

Posted by Harid九月 - 5 - 2010 Leave comments   50 views 

安装了pagebar2并开启了自动插入后,在边栏的最新文章栏底部也会出现分页,如图:

解决办法如下:

首先,关掉pagebar2的自动插入功能;

然后添加调用它函数的代码在合适的位置,需要添加代码的文件有:index.php、search.php、archive.php。

于文件末部找到诸如下面的代码:

<div class=”navigation”>
<div class=”alignleft”><?php next_posts_link(&laquo; Older Entries) ?></div> <div class=”alignright”><?php previous_posts_link(Newer Entries &raquo;) ?></div>
</div>

将其替换为:

<div class=”navigation”>
<?php
if (function_exists('wp_pagebar'))
wp_pagebar();
?>
</div>

如果没有找到则在:

<?php get_footer(); ?>

前面添加上上面的代码即可。

本方法来自:http://www.wangzecheng.com/2010/06/22/138.html

   声明:本文采用 BY-NC-SA 协议进行授权 | 星期九
   原创文章转载请注明:转自《最新文章栏出现分页后

分享本文: 腾讯微博 QQ空间 人人网 百度空间 开心网 新浪微博 Google Reader 豆瓣
No comments yet.
3 + 8 =  (required)
 疑问 鼓掌 难过 呲牙 强 微笑 快哭了 坏笑 汗 奋斗 撇嘴 OK 偷笑 委屈 尴尬 傲慢 握手 玫瑰 胜利 大哭 抱拳
启用云输入法:      

NOTICE1: You should type some Chinese word (like “你好”) in your comment to pass the spam-check, thanks for your patience!

NOTICE2: 请申请gravatar头像(http://en.gravatar.com),木有头像的会显示为“小怪物”头像,将难以通过审核!

NOTICE3: 如果您能消除一下评论框旁边的邻居的寂寞的话,Harid将不胜感激,你懂的!^_^