Title: TW Pagination
Author: tweetysha
Published: <strong>21 ພະຈິກ 2012</strong>
Last modified: 31 ມີນາ 2015

---

ຄົ້ນຫາປລັກອິນ

ປລັກອິນນີ້ **ຍັງບໍ່ທັນໄດ້ຮັບການທົດສອບກັບ WordPress 3 ເວີຊັນຫຼັກຫຼ້າສຸດ**. ມັນອາດຈະ
ບໍ່ໄດ້ຮັບການເບິ່ງແຍງ ຫຼື ສະໜັບສະໜູນອີກຕໍ່ໄປ ແລະ ອາດມີບັນຫາການເຮັດວຽກຮ່ວມກັນເມື່ອ
ໃຊ້ກັບ WordPress ເວີຊັນທີ່ໃໝ່ກວ່າ.

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

# TW Pagination

 ໂດຍ [tweetysha](https://profiles.wordpress.org/tweetysha/)

[ດາວໂຫຼດ](https://downloads.wordpress.org/plugin/tw-pagination.zip)

 * [ລາຍລອຽດ](https://lo.wordpress.org/plugins/tw-pagination/#description)
 * [ການຣີວິວ](https://lo.wordpress.org/plugins/tw-pagination/#reviews)
 *  [ການຕິດຕັ້ງ](https://lo.wordpress.org/plugins/tw-pagination/#installation)
 * [ການພັດທະນາ](https://lo.wordpress.org/plugins/tw-pagination/#developers)

 [ການຊ່ວຍເຫຼືອ](https://wordpress.org/support/plugin/tw-pagination/)

## ຄຳອະທິບາຍ

TW Pagination is a simple and flexible pagination plugin which provides users with
better navigation on your WordPress site.

In addition to increasing the user experience for your visitors, it has also been
widely reported that pagination increases the SEO of your site by providing more
links to your content.

TW Pagination can also be used to paginate post comments!

## ການຕິດຕັ້ງ

_Install and Activate_

 1. Unzip the downloaded `tw-pagination` zip file
 2. Upload the `tw-pagination` folder and its contents into the `wp-content/plugins/`
    directory of your WordPress installation
 3. Activate TW Pagination from Plugins page

_Implement_

For posts pagination:

1) Open the theme files where you’d like pagination to be used. Usually this is 
the `loop.php` file. For older version of WordPress, you may need to update the `
index.php`, `archive.php` and `search.php` files.

2) Replace your existing `previous_posts_link()` and `next_posts_link()` code block
with the following:

    ```
    <?php if(function_exists('tw_pagination')) 
        tw_pagination();
    ?>
    ```

For comments pagination:

1) Open the theme file(s) where you’d like comments pagination to be used. Usually
this is the `comments.php` file.

2) Replace your existing `previous_comments_link()` and `next_comments_link()` code
block with the following:

    ```
    <?php if(function_exists('tw_pagination_comments')) 
        tw_pagination_comments();
    ?>
    ```

_Configure_

1) Configure the TW Pagination settings, if necessary, from the TW Pagination option
in the Settings menu

2) The styles can be changed with the following methods:

 * Add a `tw-pagination.css` file in your theme’s directory and place your custom
   CSS there
 * Add your custom CSS to your theme’s `styles.css`
 * Modify the `tw-pagination.css` file in the tw-pagination plugin directory

_Note:_ The first two options will ensure that TW Pagination updates will not overwrite
your custom styles.

## ຄຳຖາມທີ່ພົບເລື້ອຍ

  How can I override the default pagination settings?

The `tw_pagination()` and `tw_pagination_comments()` functions each takes two optional
arguments.
 Second argument is in query string format, which allows you to override
the global settings. The available options are:

 * title – The text/HTML to display before the pagination links
 * nextpage – The text/HTML to use for the next page link
 * previouspage – The text/HTML to use for the previous page link
 * before – The text/HTML to add before the pagination links
 * after – The text/HTML to add after the pagination links
 * empty – Display before markup and after markup code even when the page list is
   empty
 * range – The number of page links to show before and after the current page
 * anchor – The number of links to always show at beginning and end of pagination
 * gap – The minimum number of pages before a gap is replaced with an ellipsis (…)

You can even control the current page and number of pages with:

 * page – The current page. This function will automatically determine the value
 * pages – The total number of pages. This function will automatically determine
   the value

Examples (also applies to `tw_pagination_comments()`):

1) To paginate custom WP_Query:

    ```
    <?php 
        $the_query = new WP_Query( $args ); 
        while($the_query->have_posts()) : $the_query->the_post();
        // your code
        endwhile;

        if(function_exists('tw_pagination')) 
            tw_pagination($the_query, 'range=4&anchor=2&nextpage=Next&previouspage=Previous');
    ?>
    ```

2) To paginate default WP_Query with custom settings

    ```
    <?php if(function_exists('tw_pagination')) 
        tw_pagination('global', 'range=4&anchor=2&nextpage=Next&previouspage=Previous');
    ?>
    ```

3) To paginate default WP_Query

    ```
    <?php if(function_exists('tw_pagination')) 
        tw_pagination();
    ?>
    ```

  How can I style the comments pagination differently than the posts pagination?

When calling `tw_pagination_comments()`, TW Pagination adds an extra class to the`
ol` element, `tw-pagination-comments`.

This allows you to use the `.tw-pagination-comments` styles, already in `tw-pagination.
css`, to override the default styles.

## ການຣີວິວ

ບໍ່ມີການຣີວິວສຳລັບປລັກອິນນີ້.

## ຜູ້ຮ່ວມພັດທະນາ ແລະ ຜູ້ພັດທະນາ

“TW Pagination” ແມ່ນຊອຟແວໂອເພັນຊອດ (Open Source). ບຸກຄົນຕໍ່ໄປນີ້ໄດ້ມີສ່ວນຮ່ວມໃນການ
ພັດທະນາປລັກອິນນີ້.

ຜູ້ຮ່ວມພັດທະນາ

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

[ແປ “TW Pagination” ເປັນພາສາຂອງເຈົ້າ.](https://translate.wordpress.org/projects/wp-plugins/tw-pagination)

### ສົນໃຈຮ່ວມພັດທະນາບໍ່?

[ເບິ່ງລະຫັດ](https://plugins.trac.wordpress.org/browser/tw-pagination/), ກວດເບິ່ງ
[ຄັງເກັບ SVN](https://plugins.svn.wordpress.org/tw-pagination/), ຫຼື ຕິດຕາມ [ບັນທຶກການພັດທະນາ](https://plugins.trac.wordpress.org/log/tw-pagination/)
ຜ່ານ [RSS](https://plugins.trac.wordpress.org/log/tw-pagination/?limit=100&mode=stop_on_copy&format=rss).

## ບັນທຶກການປ່ຽນແປງ

#### 1.1

 * Removed PHP4 constructor
 * Code improvements

#### 1.0

 * Initial release

## ຂໍ້ມູນກຳກັບ (Meta)

 *  ເວີຊັນ **1.1**
 *  ອັບເດດຫຼ້າສຸດເມື່ອ **11 ປີ ທີ່ຜ່ານມາ** ທີ່ຜ່ານມາ
 *  ການຕິດຕັ້ງທີ່ໃຊ້ງານຢູ່ **1,000+**
 *  ເວີຊັນ WordPress ** 3.0 ຫຼື ສູງກວ່າ **
 *  ທົດສອບເຖິງເວີຊັນ **4.1.42**
 *  ພາສາ
 * [English (US)](https://wordpress.org/plugins/tw-pagination/)
 * ແທັກ
 * [navigation](https://lo.wordpress.org/plugins/tags/navigation/)[page](https://lo.wordpress.org/plugins/tags/page/)
   [Paginate](https://lo.wordpress.org/plugins/tags/paginate/)[pagination](https://lo.wordpress.org/plugins/tags/pagination/)
 *  [ມຸມມອງຂັ້ນສູງ](https://lo.wordpress.org/plugins/tw-pagination/advanced/)

## ການໃຫ້ຄະແນນ

 5 ຈາກທັງໝົດ 5 ດາວ.

 *  [  ການວິຈານ 5 ດາວ ຈຳນວນ 7 ລາຍການ     ](https://wordpress.org/support/plugin/tw-pagination/reviews/?filter=5)
 *  [  ການວິຈານ 4 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/tw-pagination/reviews/?filter=4)
 *  [  ການວິຈານ 3 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/tw-pagination/reviews/?filter=3)
 *  [  ການວິຈານ 2 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/tw-pagination/reviews/?filter=2)
 *  [  ການວິຈານ 1 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/tw-pagination/reviews/?filter=1)

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

[ເບິ່ງ ຄຳຄິດເຫັນ ທັງໝົດ](https://wordpress.org/support/plugin/tw-pagination/reviews/)

## ຜູ້ຮ່ວມພັດທະນາ

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

## ການຊ່ວຍເຫຼືອ

ມີຄຳຖາມ ຫຼື ຕ້ອງການຄວາມຊ່ວຍເຫຼືອບໍ່?

 [ເບິ່ງຟໍຣັມການຊ່ວຍເຫຼືອ](https://wordpress.org/support/plugin/tw-pagination/)