Wordpress常用插件之分页插件Pagebar用法

八 26th, 2009  
0

Comments

Wordpress默认的分页方式,是“« Previous Entries” “Next Entries ”用起来很不方便,大多数博客都是显示页码的,当然Wordpress也可以实现。

有两个插件可以实现,分别是Pagebar和Wp-PageNavi,今天介绍Pagebar插件。

插件官方网站:http://wordpress.org/extend/plugins/pagebar/

当前最新版本Last Updated: 2009-8-25

使用方法:

1.将解压后的pagebar文件夹传到/wp-content/plugins/,并将pagebar文件夹内的pagebar.css上传到主题的文件夹/wp-content/themes/XXX/下面

2.登录到后台启动插件,默认选项即可。

3.修改需要显示页码的页面一般为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>

<div class=”navigation”>

<?php if (function_exists(’wp_pagebar’))

wp_pagebar();

?>

</div>

ok,刷新页面即可显示了。

大家可以看下效果:

pb2

声明: 本站遵循 署名-非商业性使用-相同方式共享 3.0共享协议.转载请注明转自 http://www.amakura.cn/blog/index.php/archives/630  【天仓零's   blog:无限轮回】

Tags:

Leave a Reply