Quantcast
Viewing all articles
Browse latest Browse all 4

Answer by Milo for How to disable content pagination?

EDIT - Now that 4.4 is out, you should use the content_pagination filter. See birgire's answer below.


You can add formatting to raw post content by applying the content filters directly to $post->post_content:

echo apply_filters( 'the_content', $post->post_content );

This will bypass pagination by not using the get_the_content function, which is what the_content uses internally to retrieve the current page's content for multipage posts.

You can prevent wp_link_pages from outputting anything by applying a filter to its output before the function is called and using the __return_empty_string helper function:

add_filter( 'wp_link_pages', '__return_empty_string' );

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>