Skip to content

The nextpage tag is no longer inserted (solved)

Replies: 0

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 (

).
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

but not also the inline-style paragraph notations like

.

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( ‘/(?=

)/i’, ‘

’, $content );

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

<li id="bbp-topic-revision-log-12028416-item-12028479" class="bbp-topic-revision-log-item">
	This topic was modified 1 month, 2 weeks ago by <a href="https://wordpress.org/support/users/paolov/" title="View paolov's profile" class="bbp-author-link"><span  class="bbp-author-name">paolov</span></a>.
</li>

Replies: 0

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 (

).
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

but not also the inline-style paragraph notations like

.

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( ‘/(?=

)/i’, ‘

’, $content );

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

<li id="bbp-topic-revision-log-12028416-item-12028479" class="bbp-topic-revision-log-item">
	This topic was modified 1 month, 2 weeks ago by <a href="https://wordpress.org/support/users/paolov/" title="View paolov's profile" class="bbp-author-link"><span  class="bbp-author-name">paolov</span></a>.
</li>

Author: paolov

Forum URL: https://wordpress.org/support/topic/the-nextpage-tag-is-no-longer-inserted-solved/

Date created: 2019-10-14T17:19:25.000Z