New answers tagged

0

It determines which exact resources do you measure. Retrieving feed is essentially a network request. Making network request isn't CPU or memory intensive, but it is relatively very slow. Depending on limitations and configuration of specific hosts it might or might not be a problem. Also feeds are natively cached. However if cache if flushed in use cases ...


0

Yes it's true your code can consume more resources then normal.Because you are working with feed and fetch_feed() consume more. It creates SimplePie object based on RSS or Atom feed from URL. You can do one thing just limiting your post as below: <h2><?php _e( 'Recent news from Some-Other Blog:', 'wpdocs_textdomain' ); ?></h2> <?php // ...


1

1 fetch_feed will get the feed and store it, along with the time it was fetched. 2 Every time the page with the feed is generated the time will be checked. If it is more than twelve hours ago, the feed will be reloaded. Note that this may interfere with caching plugins, who will bypass the normal page generation. Also, if the site is visited very little, ...


3

As mentioned by @Sumit, you need to turn off the comments feed for a page (which I find really strange since by default comments are off on pages?) ... this is what I ended up with (allowing for getting the page comments feed with ?withcomments=1 if wanted): add_action('pre_get_posts', 'rss_page_feed_full_content'); function rss_page_feed_full_content($q) ...


4

This may not be ideal, but it is a beginning. First make sure that the full content is in the feed: function fullcontentfeed($content) { global $post; $content = $post->post_content; return $content; } add_filter('the_excerpt_rss', 'fullcontentfeed'); You should then see the full feed at this url ...


7

First set the post type to display on main feed page i.e. /feed using pre_get_posts hook $q->set('post_type', array('post', 'page')); On individual page WordPress shows comment feed then set it to false and display page content in feed. $q->is_comment_feed = false; In feed template WordPress calls the_excerpt_rss() which calls get_the_excerpt() ...


2

Sure, you can. First create the feed as per codex: function anotherfeed_init(){ add_feed('anotherfeed'); } add_action('init', 'anotherfeed_init'); Now, change the post count for this particular feed: function anotherfeed_post_count( $query ) { if( $query->is_main_query() && is_feed('anotherfeed') ) $query->set( ...



Top 50 recent answers are included