
內容簡介
WP Table of Paginated Contents 可以管理文章的分頁命名並生成目錄。
該插件使用 WordPress 的原生<!--nextpage-->標籤,但添加了一個短代碼來存儲節段標題。
請參閱截圖以更清晰地了解插件。
功能:
命名每個文章頁面;
輸出或生成目錄(使用列表或下拉菜單);
輸出或生成下一篇/上一篇文章頁面導航,並使用節段標題。
歡迎提出建議,如發現任何錯誤請報告!
用法
該插件提供兩種在迴圈(https://codex.wordpress.org/The_Loop)中使用的主要方法。
要輸出目錄:
<?php if( function_exists( 'wptopc' ) ){ wptopc(); } ?>
要輸出下一篇/上一篇導航鏈接:
<?php if( function_exists( 'wptopc_pagination_links' ) ){ wptopc_pagination_links(); } ?>
用法示例
要輸出目錄,請在文章迴圈內使用以下代碼片段:
<?php if( function_exists( 'wptopc' ) ){ wptopc(); } ?>
或者您可以使用以下代碼片段,將目錄輸出為下拉菜單:
<?php if( function_exists( 'wptopc' ) ){ wptopc("select", "The Post Table of Contents"); } ?>
要輸出帶有節段標題的下一篇/上一篇導航,請在文章迴圈內使用以下代碼片段:
<?php if( function_exists( 'wptopc_pagination_links' ) ){ wptopc_pagination_links(); } ?>
要存儲這些函數的輸出,請在函數名稱前添加 “get_” 前綴,例如:
get_wptopc()
或
get_wptopc_pagination_links()
外掛標籤
開發者團隊
原文外掛簡介
WP Table of Paginated Contents handles naming of each post page and produces a Table of Contents.
It uses the native
