2016-09-27 23 views

答えて

2

よりもむしろthe_content()を使用する(つまり、直接ページのコンテンツを印刷します)、あなたはget_the_content()を使用して、そこからそれを分割することができます。

$parts = explode('<!--nextpage-->', get_the_content()); 
1

だけ(内容はそれをエコーする関数get_the_contentを使用し、 get_functionはできません)、次のように展開してください:

$content = get_the_content(); 
list($page, $nextpage) = explode('<!--nextpage-->', $content); 

// or when $content has more than one "<!--nextpage-->" 
$pages = explode('<!--nextpage-->', $content); 
関連する問題