I was googling and searcing Codex for the past half hour, but can't find it:
What function can I use to fetch content of a single page within a post.
Let's say I want to split my post to 5 pages - how can I get content of, say, page 3?
I was googling and searcing Codex for the past half hour, but can't find it:
What function can I use to fetch content of a single page within a post.
Let's say I want to split my post to 5 pages - how can I get content of, say, page 3?
Thanks, but that wasn't what I was looking for, tho.
For future Googlers, there doesn't seem to be a specific function, but here is something similar and simple:
$content_full = apply_filters('the_content', $post->post_content);
$content = explode("<!--nextpage-->", $content_full);
$page = count($content);
echo $page[$i];Ah sorry, I misread you. In order to get content of page 3, all you need to do is add the page parameter to the query.
global $query_string;
query_posts($query_string . "&page=3");
while ( have_posts() ) : the_post();Thanks!
You must log in to post.