Title: Custom Pagination
Author: dimitryz
Published: <strong>2009 年 8 月 25 日</strong>
Last modified: 2014 年 12 月 27 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/custom-pagination.svg)

# Custom Pagination

 作者：[dimitryz](https://profiles.wordpress.org/dimitryz/)

[下载](https://downloads.wordpress.org/plugin/custom-pagination.zip)

 * [详情](https://cn.wordpress.org/plugins/custom-pagination/#description)
 * [评价](https://cn.wordpress.org/plugins/custom-pagination/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/custom-pagination/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/custom-pagination/#developers)

 [支持](https://wordpress.org/support/plugin/custom-pagination/)

## 描述

With the Custom Pagination plugin, a user may customize the look of a post’s next
and previous links using the HTML editor. It is built by [WebIT.ca (Dimitry Zolotaryov)](http://webit.ca)
and funded by [DateDaily.com](http://datedaily.com): an online dating and relationship
blog.

The link is created by selecting the text label within a post’s body and clicking
the link icon. In the Link URL field, the following values will produce a link to
another page:

 * _page:next_ links to the next page
 * _page:prev_ or _page:previous_ links to the previous page
 * _page:first_ links to the first page of the post
 * _page:last_ links to the last page of a post
 * _page:n_ links to the nth page of a post (e.g. page:2 for the second page)

If link is directing to a page that does not exist — for instance _page:next_ on
the last page –, the link and the link text do not appear.

All links processed by Custom Pagination will have the added class name ‘page’. 
If you wish to style such links, in your CSS, add the line:

    ```
    a.page { /* page style goes here */ }
    ```

For more information, visit the [Custom Pagination plugin homepage](http://webit.ca/2009/08/custom-pagination-plugin-for-wordpress/).

## 屏幕截图

[⌊Selecting text for a link to the next page⌉⌊Selecting text for a link to the next
page⌉[

Selecting text for a link to the next page

[⌊Adding the next page link text⌉⌊Adding the next page link text⌉[

Adding the next page link text

[⌊The generated link⌉⌊The generated link⌉[

The generated link

## 安装

 1. Copy or upload the `custom-pagination` directory into your `/wp-content/plugins/`
    directory
 2. If you downloaded a zipped copy (i.e. `custom-pagination.zip`), use the ‘Plugins’
    > ‘Add New’ section of WordPress to upload it
 3. Activate the plugin through the ‘Plugins’ menu in WordPress

Done.

Actually, if you wish to use WordPress pagination when there is no Custom Pagination
on a page, you may use the following PHP code:

    ```
    // inside single.php
    // displays the standard pagination when no custom pagination link is found
    if ( ! cp_link_found() )
        wp_link_pages(array('next_or_number' => 'next', 'nextpagelink'=>'Next page &raquo;', 'previouspagelink'=>'&laquo; Previous page'));
    ```

## 常见问题

_Will the pagination work with custom permalinks?_

It should.

_What is the cost of the plugin?_

This plugin is provided free of charge thanks to the good people at [Mate1 Inc](http://mate1.com)
and the site [DateDaily.com](http://datedaily.com). You may use the Custom Pagination
plugin for any purpose provided you keep the comment section of the custompagination.
php file.

_How do I remove the default pagination_

If you are seeing the default pagination in your posts, you probably have the following
code in you `content.php` theme file. Remove it and the default pagination should
disappear.

    ```
        wp_link_pages( array(
            'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
            'after'       => '</div>',
            'link_before' => '<span>',
            'link_after'  => '</span>',
            'pagelink'    => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
            'separator'   => '<span class="screen-reader-text">, </span>',
        ) );
    ```

## 评价

此插件暂无评价。

## 贡献者及开发者

「Custom Pagination」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ dimitryz ](https://profiles.wordpress.org/dimitryz/)

[帮助将「Custom Pagination」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/custom-pagination)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/custom-pagination/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/custom-pagination/)，或通过[RSS](https://plugins.trac.wordpress.org/log/custom-pagination/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/custom-pagination/)。

## 额外信息

 *  版本 **1.0.2**
 *  最后更新：**11 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 2.8 或更高版本 **
 *  已测试的最高版本为 **4.1.42**
 *  语言
 * [English (US)](https://wordpress.org/plugins/custom-pagination/)
 * 标签
 * [editing](https://cn.wordpress.org/plugins/tags/editing/)[pagination](https://cn.wordpress.org/plugins/tags/pagination/)
 *  [高级视图](https://cn.wordpress.org/plugins/custom-pagination/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/custom-pagination/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/custom-pagination/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/custom-pagination/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/custom-pagination/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/custom-pagination/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/custom-pagination/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/custom-pagination/reviews/)

## 贡献者

 *   [ dimitryz ](https://profiles.wordpress.org/dimitryz/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/custom-pagination/)