Recently one of our users complained to us about WordPress post pagination hiding the full content in their RSS feed. After doing a quick research, it turns out that this is a WordPress core bug (#10984) that was reported 4 years ago and is still not fixed. In this article, we will show you how to fix the WordPress post pagination hiding content in RSS feeds.
The problem occurs when you split your WordPress posts in multiple pages, and if you have set RSS feeds to display full text, then your RSS feeds will only display the content of the first page of the post (i.e before <!--nextpage-->
tag).
Thankfully one of the contributors, Simon Wheatley, have posted a work around that fixes the bug.
All you need to do is add this code in your theme’s functions.php file or in a site-specific plugin:
function wpb_full_text_for_feeds( $content ) { if ( ! is_feed() ) return $content; global $post; $content = $post->post_content; return $content; } add_filter( 'the_content', 'wpb_full_text_for_feeds', -100 );
The above code adds a filter to the_content
allowing the feeds to display full post content and ignoring the pagination (see more examples of how to add content in your RSS feeds). Hopefully this issue will get resolved soon in a future version of WordPress. Until then this workaround will make sure that your subscribers get the full content in their RSS reader.
We hope this article helped you fix WordPress post pagination issue in RSS feeds. Let us know what you think by leaving a comment below or join us on Twitter and Google+.
Amlan Dutta
How do you make the floating bar float and then stop as soon as the content end is reached ,
Amlan Dutta
Hamza
Interesting!