Support » Fixing WordPress » Next Page split post question

  • Andrei

    (@thequietdream)


    Hello everyone,

    I wonder if anybody has been using the <!–nextpage–> tag to split posts in custom installations of WP.

    I have tried using this tag that I found in the WP docs to create pagination inside a post, but so far it does nothing whatsoever. Initially I thought it might be the fault of the theme I was using, but switching to the default WP theme didn’t help the situation. I have also tried to create a simple page for the single post where I could use the wp_link_pages function, but again to no result.

    Could anyone offer some suggestions to what I need to do to use this tag (or obtain pagination within a post) ?

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    moderator

    Did you use the html-mode of the editor to insert the <!--nextpage--> tag?

    Do you use wp_link_pages within The Loop?

    http://codex.wordpress.org/Styling_Page-Links

    Andrei

    (@thequietdream)

    Hi keesiemeijer, thanks for the reply.

    yes, I used the html editor to add the tag (otherwise it would’ve displayed the tag itself as text within the post). I even checked the database entry with phpMyAdmin to make sure the tag was correctly written and not encoded in some way.

    I don’t use wp_link_pages within The Loop, there’s no need for that. wp_link_pages is meant (as the codex says) to be used for a single post. As such, I used it on the single.php page, which displays a single post (not the post while looping through the list of posts) so there’s nothing to loop through.

    Moderator keesiemeijer

    (@keesiemeijer)

    moderator

    http://codex.wordpress.org/Template_Tags/wp_link_pages

    “This tag must be within The_Loop.”

    Andrei

    (@thequietdream)

    Hmmm, in this case I suspect the tag is useless to me. I need to use it on the single.php template page, which stands outside the loop. Displaying page links for the same post inside The Loop doesn’t help me.

    Have you used this function/tag before?

    Moderator kmessinger

    (@kmessinger)

    Why not use <!–more–>

    Andrei

    (@thequietdream)

    Hi kmessinger

    I am using !–more– to make the list of posts (displaying a “teaser” of each post). But “more” only splits a post in 2, I need to split a single post in several pages which should then be listed individually (page 1, 2, 3, etc).

    Moderator keesiemeijer

    (@keesiemeijer)

    moderator

    I need to use it on the single.php template page, which stands outside the loop.

    What do you mean by this? You can loop through a list which contains only 1 Post. Maybe you need to create a loop for your single.php file?

    Hello again & thanks for the suggestion,

    Took a while to go through the code but as it looks, the single.php file is itself inside a loop that goes around for one post. However, the function still produces nothing.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Next Page split post question’ is closed to new replies.