Title: Split posts
Last modified: August 16, 2018

---

# Split posts

 *  Resolved [galinaivvn](https://wordpress.org/support/users/galinaivvn/)
 * (@galinaivvn)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/split-posts-3/)
 * Hello,
    I want to split my posts to pages after X paragraphs or automatically
   and to have pagination after post, like a book, but adding <!–nextpage–> tag 
   is not an option, because I have long texts. I used this in content.php but there
   is no pagination or nex page. <?php echo wp_trim_words(get_the_content(), 500,'
   <!–nextpage–>’); ?> <?php wp_link_pages(); ?> Please help

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Theme Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/split-posts-3/#post-10596369)
 * Thanks for using Author!
 * Is there a reason it needs to be done automatically?
 * The <!–nextpage–> tag will work if inserted manually, but I’m asking this because
   writing a function to automatically insert a series of <!–nextpage–> tags is 
   going to be more challenging.
 * The `wp_trim_words()` function is going to return the first 500 words, but this
   could be in the middle of a paragraph rather than at a more natural breakpoint.
   It also only outputs the first 500 words, so a function would need to be written
   to iterate over the post content and output the next 500 words, and so on until
   the post is complete.
 * Manually adding the <!–nextpage–> tags provides much more artistic control so
   you can choose better timing in the text to transition to the next page.
 *  Thread Starter [galinaivvn](https://wordpress.org/support/users/galinaivvn/)
 * (@galinaivvn)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/split-posts-3/#post-10596396)
 * Hi, [@bensibley](https://wordpress.org/support/users/bensibley/),
    The reason
   is that I have too long texts like a novels and it would be hard to put tag manualy
 *  Theme Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/split-posts-3/#post-10596418)
 * Okay I see. I would recommend trying a plugin for this first. Maybe something
   like this: [https://wordpress.org/plugins/automatically-paginate-posts/](https://wordpress.org/plugins/automatically-paginate-posts/)
 *  Thread Starter [galinaivvn](https://wordpress.org/support/users/galinaivvn/)
 * (@galinaivvn)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/split-posts-3/#post-10596434)
 * I tried it, but it doesn’t work. May be something in theme’s code.
    Do I have
   to remove this from content.php or something else: <?php wp_link_pages( array(‘
   before’ => ‘<p class=”singular-pagination”>’ . esc_html__( ‘Pages:’, ‘author’),‘
   after’ => ‘</p>’, ) ); ?>
 * It’s not a problem to use plugin, but tried maybe 20 and no one works with theme
 *  Theme Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/split-posts-3/#post-10596445)
 * It is standard for all themes to include the `wp_link_pages()` function, so I
   would expect the plugins to be compatible with that. However, without seeing 
   the plugin code I can’t know for sure, so it is worth trying. That function can
   be safely removed from the content.php file in Author without causing any errors.
 *  Thread Starter [galinaivvn](https://wordpress.org/support/users/galinaivvn/)
 * (@galinaivvn)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/split-posts-3/#post-10596534)
 * Nothing happens with that plugin. Tried to remove and to put back wp_link_pages()
   function and still nothing.
    May be this one: [https://wordpress.org/plugins/malinky-ajax-pagination/](https://wordpress.org/plugins/malinky-ajax-pagination/)
   but I need: ‘Posts Selector’ The selector that wraps all of the posts/products.‘
   Post Selector’ The selector of an individual post/product. ‘Navigation Selector’
   The selector of the post/product navigation. ‘Next Selector’ The selector of 
   the navigation next link.
 *  Theme Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/split-posts-3/#post-10602489)
 * I think that plugin is designed to auto-load posts and replace the pagination
   on the blog rather than pagination within a single post.
 * It is possible to automate this and iterate over the post 500 words at a time,
   but it will be very difficult to prevent it from breaking up the post in the 
   middle of sentences.
 * Since there doesn’t seem to be a pre-made solution for this and the functionality
   will be complex to create, I think a manual approach is going to be best.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Split posts’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/author/1.56/screenshot.png)
 * Author
 * [Support Threads](https://wordpress.org/support/theme/author/)
 * [Active Topics](https://wordpress.org/support/theme/author/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/author/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/author/reviews/)

## Tags

 * [pagination](https://wordpress.org/support/topic-tag/pagination/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [split](https://wordpress.org/support/topic-tag/split/)

 * 7 replies
 * 2 participants
 * Last reply from: [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/split-posts-3/#post-10602489)
 * Status: resolved