[WordPress] 外掛分享: Fix Reversed Comments Pagination

首頁外掛目錄 › Fix Reversed Comments Pagination
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
5432 天前
最後更新
問題解決
WordPress 3.1+ v1.0 上架:2011-04-11

內容簡介

這個外掛能解決什麼問題?

假設某篇文章有 21 個留言,你的 WordPress 討論設定如下:

分頁顯示留言
每頁顯示 20 則留言
預設顯示最後一頁的留言
新的留言顯示在每頁的頂部

那麼預設頁面只會顯示一則留言 (#21),第二頁則會顯示留言 20 到 1。

WordPress 應該改為在預設頁面上顯示留言 21 到 2,第二頁則會顯示留言 1。這個外掛就是為了解決這個問題而存在。

安裝方式

上傳並啟用後,你必須對你的主題進行輕微的修改。

在你的主題中的 [wp_list_comments](https://codex.wordpress.org/Function_Reference/wp_list_comments),將 Walker_Comment_Wink 類別作為「Walker」傳遞,格式如下:

if (class_exists('Walker_Comment_Wink'))
$walker = new Walker_Comment_Wink();
else
$walker = '';

wp_list_comments(array('walker' => $walker));

錯誤報告與問題

我在我的網站上使用這個外掛,也已經在其他地方進行過測試,效果非常好。但你的設定可能不同,你可能會注意到我錯過的問題。如果這是問題,請在外掛的頁面 留言告訴我。

由 WinkPress 開發。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Fix Reversed Comments Pagination」→ 直接安裝(推薦)

原文外掛簡介

What Problem Does This Plugin Fix?
If you have 21 comments on a certain post, and your WordPress discussion settings are:

Comments are paginated
20 comments per page
Last page displayed by default
Newer comments displayed at the top of each page

Then the default page will show only one comment, #21. The second page will show comments 20 to 1.
What WordPress should do instead is display comments 21 to 2 on the default page, and 1 on the second page. With the help of this plugin, WordPress will do that.
Installation
After you upload and activate, you must make a minor modification to your theme.
In [wp_list_comments](https://codex.wordpress.org/Function_Reference/wp_list_comments) of your theme, pass Walker_Comment_Wink class as the “walker” — like this:
if (class_exists('Walker_Comment_Wink'))
$walker = new Walker_Comment_Wink();
else
$walker = '';

wp_list_comments(array('walker' => $walker));

Bug Reports & Issues
I’m using this plugin on my site and have tested it else where. It works great. But your setup might be different and you may notice things I missed. If that’s the case, tell me in the comments of the plugin’s page.
Developed by WinkPress.

延伸相關外掛

文章
Filter
Mastodon