這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

LCP Ajax Pagination

外掛說明

LCP Ajax Pagination is an add-on plugin for List Category Posts.
Many users have requested the AJAX pagination feature and it is now possible with this extension.

Two modes are currently supported:

  • Ajax pagination
  • Load more posts

IMPORTANT: Requires List Category Posts version 0.84.1 or greater.

Ajax pagination

Usage: [catlist ajax_pagination=yes]

The result is as if you used [catlist pagination=yes] but clicking pagination links does not trigger page reloads.
Instead, new posts are fetched asynchronously and the list is updated without a reload.

No other features of LCP pagination are modified,
you can apply your pagination CSS, or other customisations, same as you have before.

Load more

Usage: [catlist ajax_loadmore=yes]

This transforms vanilla LCP pagination by replacing pagination links with a “Load more” link. Note that this
first release does not allow specifying how many posts to fetch and uses the numberposts shortcode parameter
same as vanilla pagination.
This will change in a future release.

You can customise the link’s text using LCP’s pagination_next parameter:
[catlist ajax_loadmore=yes pagination_next=”Show more posts”]

General notes

  • IMPORTANT: If you have multiple shortcodes on a page, those using AJAX must have the instance parameter set
    as per the documentation.
    [catlist ajax_loadmore=yes instance=1]
  • You do not have to use LCP’s pagination parameter, using ajax_loadmore or ajax_pagination is enough.
  • Make sure your shortcode contains only one option: ajax_loadmore or ajax_pagination, otherwise the plugin will not work.

CSS customisations

The plugin uses the following CSS classes:

  • AJAX pagination <ul> has the original lcp_paginator class, this plugin also adds lcpax-pagination.
  • Wrapper around the load more link is: <div class="lcpax-nextlink-wrapper">, the link itself is left unchanged
    as delivered by LCP, so it has the lcp_nextlink class.
  • The SVG spinner displayed while waiting for ‘load more’ to finish has the lcpax-spinner class.

Development

LCP Ajax is open source software. You can find the
development version of the plugin on Github.

All suggestions and contributions are welcome 🙂 Fork it, read the respository’s
readme and start helping with the development!

Support the plugin

If you have found this plugin useful and would like to support its further development please consider
sponsoring it on GitHub or donating on PayPal 🙂

User Support

Please use the support forum for questions about using the plugin. Use Github issues for discussing code changes and bugs.

安裝方式

Please note that this is an add-on plugin which requires List Category Posts to be installed and activated.

使用者評論

閱讀全部 2 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈LCP Ajax Pagination〉的開發相關工作。

參與者

將〈LCP Ajax Pagination〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

0.1.5

  • Updated dependencies.

0.1.4

  • Updated dependencies.

0.1.3

  • Updated dependencies.

0.1.2

  • Fixed load more link remaining active before previous fetch is finished.

0.1.0

  • Initial release