Can not fetch text from next page content
<p>Replies: 0</p>
<p>First of all, thanks for this simple n yet great plugin. It works like a charm.</p>
I only have one issue here, i.e. fetching one line text from next page content for teaser purpose. When I used manual –nextpage– tag, the code can fetch text from next page content . But when –nextpage– tag is generated automatically by your plugin, the code can not fetch it, thus it returns null.
Did I miss something? Here’s the code to fetch text for teaser:
if ($page < $numpages) {
$nextpage = intval($page) + 1;
$next_link = get_permalink() . '/' . $nextpage;
$content = get_post_field('post_content', get_the_ID());
$content_parts = explode('<! --nextpage-- >', $content);
$teaser = strip_tags($content_parts[$page]);
$teaser = substr($teaser, 0, 30). "...";
echo '<p>'. $next_link . $teaser . '</p>';
}
thanks for your help
https://wordpress.org/support/topic/can-not-fetch-text-from-next-page-content/
https://wordpress.org/support/topic/can-not-fetch-text-from-next-page-content/