• The first problem was related to this line:

    $content = $the_post->post_content;

    WordPress must have changed the output of post_content at some point, and now post_content return only text, without html paragraph notation ( <p></p> ).
    But this plugin require them, because it does a series of checks and in his subroutine changes the paragraph html notation with a double new line (just to count the paragraphs, the plug-in does not make any changes to your text).

    So, this problem can be easily solved changing line #370 to:

    $content = wpautop( $the_post->post_content );

    But there may be another problem. The plug-in checks the notation <p> … </p>but not also the inline-style paragraph notations like <p style=”text-align: center;>…</p>.

    So, it’s better to eventually stripe the inline-style part adding another control just after:
    “//Normalize post content to simplify paragraph counting and automatic paging. Accounts for content that hasn’t been cleaned up by TinyMCE.” (line #372)

    $content = preg_replace( ‘/(?=<p )(.*?)(>)/i’, ‘<p>’, $content );

    The file to change is located in “plugins/automatically-paginate-posts/automatically-paginate-posts.php”

    • This topic was modified 5 years, 5 months ago by paolov.
  • The topic ‘The nextpage tag is no longer inserted (solved)’ is closed to new replies.