Bypass fetch_feed cache

SimplePie does not necessarily use the exact feed URL that was passed to fetch_feed() – see SimplePie::get_cache_filename(), but yes, WordPress adds the feed_ prefix to the transient key. So you can instead try using the wp_feed_options hook to get the correct transient key and then delete the existing transient. $bypass = $this->bypass; add_action( ‘wp_feed_options’, function … Read more

Custom RSS causing timeout for website

As @TomJNowell mentioned it’s weird to use get_headers() for this. It would be better to remove the $img variable entirely and just use strlen() in your enclosure to get the length of the string in bytes: <enclosure url=”<?php if ( has_post_thumbnail( $post->ID ) ) { the_post_thumbnail_url(); } ?>” length=”<?php if ( $image ) { echo … Read more

Does it makes sense to have {post}/feed?

Yes, it’s a core feature in WordPress, and /post-name/feed/ is a post-specific comment feed and is one of the built-in feeds in WordPress — see https://wordpress.org/support/article/wordpress-feeds/ which says: Comments Your site has feeds for all comments on the site, and each post has its own comment feed. Site comment feed: http://example.com/comments/feed/ (permalink format) http://example.com/?feed=comments-rss2 (default/plain … Read more

Password Protect a Podcast Feed?

http://wordpress.org/extend/plugins/advanced-post-privacy/ http://wordpress.org/extend/plugins/show-private/ Either of these would work, depending on how you want to share the posts.

How can I rename the element to in my RSS?

Bearing in mind my comment about, you can use the rss_item hook to add a filter that will let you add the <author>element to your feed function add_author_to_feed($feed) { $feed .= ‘<author>’ . the_author_meta(‘user_email’) . ‘</author>’; return $feed } add_filter(‘rss_item’, ‘add_author_to_feed’); (note – this code is not tested)

Need correct results from 6 rss (fetch_feed)

What you’re looking for is probably something along the lines of: <ul id=”news-ticker” style=”float: left;height: 15px !important; margin-left: 2px; margin-top: 10px; overflow: hidden; position: relative;width: 500px;”> <?php $rsslist = array( “http://thehoopdoctors.com/online2/newfeed/”, “http://thepigskindoctors.com/newfeed/”, “http://thepuckdoctors.com/newfeed/”, “http://thecagedoctors.com/newfeed/”, “http://thedugoutdoctors.com/newfeed/”, “http://videogoneviral.com/newfeed/” ); foreach ( $rsslist as $rssurl ): /* For every URL in the feed list */ $feed = fetch_feed($rrsurl); … Read more

Conditional tag to show content in custom rss feed?

Okay, that was quite easy. So, if your custom feed URL (non-pretty) is http://example.com/?feed=wpse63760_custom_feed, then the conditional tag would be used as such: if ( is_feed( $feeds=”wpse63760_custom_feed” ) ) { // So what’s the conditional content? } else { // This is shown everywhere else }

tech