WordPress 文章內容新增分頁的方法

2021-08-09 22:10:37 字數 1118 閱讀 5618

ordpress 文章內容新增分頁的方法

wordpress系統內建文章內容分頁功能。使用很簡單,只要在文章中想要分頁的地方,插入 即可。(注意是在文字編輯模式下)

要實現文章內容分頁功能,還需要theme支援,現在大部分的theme都支援文章內容分頁。wordpress的預設theme是支援的,如果你的theme不支援,

那麼請找到你theme內的single.php裡的這行**

[php]view plain

copy

<?php  the_content(); ?>  

在這行**的下面加入

[php]view plain

copy

<?php   

$args = array(  

'before'           => '' . __('pages:'),  

'after'            => '

',  

'separator'        => ' ',  

'nextpagelink'     => __('next page'),  

'previouspagelink' => __('previous page')  

);  

wp_link_pages($args);  

?>  

wp_link_pages

開啟theme下的functions.php,加入

iOS正則式(逐步新增文章內容)

x x格式 號正規表示式 1 3 0 9 5 0 35 9 8 025 9 0 9 0 9 注 正則式中的 是早期版本需要新增的,新增之後才可以識別正則式,現在的版本不需新增也可以使用 使 號顯示為 x x的格式 void formatphone else if le 8 其他型別的格式控制與之類似...

python 實現文章內容統計

實現對目標檔案所有字元統計,單獨不重複字元統計,並通過字典列印以及寫入excel,以檔案的形式輸出統計的結果。data read data 為 read 返回的結果 generate excel data generate excel 函式傳入引數 data for key,value in dat...

對文章內容進行分頁

得到分頁後的資料 文章內容 文章字數 不包含html public static listsubstringto string param,int size return list 按位元組長度擷取字串 支援擷取帶html 樣式的字串 將要擷取的字串引數 擷取的位元組長度 字串末尾補上的字串 返回擷...