How to Fix WordPress Post Pagination Hiding Content in RSS Feed.. | Tutorial Freak – Online Tutorials

How to Fix WordPress Post Pagination Hiding Content in RSS Feed..

how-to-add-custom-avatar

How to Fix WordPress Post Pagination Hiding Content in RSS Feed

WordPress post pagination is still hiding the full content of your RSS feed. After doing some 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.
All you need to do is add this code in your theme’s functions.php file or in a site-specific plugin:

1 function wpb_full_text_for_feeds( $content ) {
2 if ( ! is_feed() )
3 return $content;
4 global $post;
5 $content = $post->post_content;
6 return $content;
7 }
8
9 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 ignore the pagination. Hopefully this issue will get resolved soon in a future version of WordPress (But don’t hold your breath). Until then this workaround will make sure that your subscribers get the full content in their RSS reader.

KeithM..

Pro Photographer, WebMaster & Writer.. Please follow us on Facebook

KeithM.. – who has written posts on Tutorial Freak – Online Tutorials.


Help keep us alive & kicking, we need coffee 24/7, please donate, thanks!
Embed

Leave a Reply

      
      
      
             
      
  • 50 Ways To Build Backlinks..