1

How to use the filter, before WordPress converts <!--nextpage-->?

The following construction does not work:

add_filter ( "the_content", function( $content ) {

  $content = preg_replace( "/(\<\!--nextpage--\>)/miu", htmlspecialchars( $1, ENT_QUOTES, 'UTF-8', false ), $content );

  return $content;

});

Code just for example.

  • 4
    What's the end goal here or what are you trying to achieve? – birgire May 8 '17 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.