0
在我的標題主題文件中,我試圖獲取評論頁面的總數。如何獲得評論頁數?
我已經嘗試:
echo get_comment_pages_count();
echo get_comment_pages_count(get_the_ID());
如果我在我的「的comments.php」主題頁面把這個代碼,它的工作。
我的目的是爲我的標題添加一個「noindex」標籤。
最新評論是在最大的評論頁面。我不想看到與其他頁面有重複的內容。
實施例:
Page 1 => noindex
Page 2 => noindex
Page 3 => noindex
Page 4 => ok
在標題和功能主題的網頁,該函數返回0: get_comment_pages_count();