Articles of feed

How do I fetch feed info from cache instead of directly from feed?

I have been using SimplePie to fetch items from a feed and display them on an aside section on my site. I didn’t notice before, but this was increasing the load time of the site by over 10 seconds. The reason I believe is that I haven’t been using cache, so every time someone entered […]

WordPress – Sync wordpress post with JSON feed

I hope you all are doing well. I need to ask something, I tried searching for this but unable to get any relevant answer. I have a JSON feed and using that feed I want to create posts and want to sync/updated those posts whenever JSON feeds changes. Please guide me in this regards. I […]

WordPress Add to title tag in rss feed

i have this feed and i want to adding [CDATA] to title tag. I try to add this to functions.php but with no luck. add_filter(‘the_title_rss’, ‘job_modify_post_title’); function job_modify_post_title ( $title ) { if ( is_feed(‘job_feed’ ) ) { return ‘<title><![CDATA[‘ . $title . ‘]]></title>’; } } Any help? Best Regards, Panagiotis Mitsinigkos

Add ! to permalink rss

in the next part of adding ![CDATA] to title tag as you can see by the link below WordPress Add [cdata] to title tag in rss feed now i am trying to add ![CDATA] to the link tag using the_permalink_rss This is the code i have so far: //Add cdata to job permalink rss add_filter( […]

Disable links in header (feeds and such)

I want to disable feeds and things like that (rpc, pingbacks, wlwmanifest, prev/next). Reason is that the website is not a blog, so these are of no use. I wrote the following in a plugin: remove_action(‘wp_head’, ‘rsd_link’); remove_action(‘wp_head’, ‘feed_links’, 2); remove_action(‘wp_head’, ‘wlwmanifest_link’); // and so on… Indeed the links are no longer in the header. […]

Create unique page without header.php for json feed

I have two WordPress sites on separate domains. I need to expose the latest posts within a category via a json feed on one site that I have to use for the other site. I’ll need to hit a “hidden” url, ex: /themes/mytheme/json_api.php?cat=news to get the json response. I’d like this json feed to be […]

Add source URL from Feed WordPress (Syndication) plugin to a custom field in post editor

We’re using the Feed WordPress (Syndication) plugin to ingest external feeds resulting in posts published in WordPress. The plugin pulls the ‘source’ URL from the feed. We can display the source URL fine against the post on home and post page, but if the feed owner did not include a source URL, it does not […]

Update feed more frequently

When i publish new posts, i notice the new posts do not appear in the feed instantaneously, there is always lag time, one or several hours. When i change something in wp-includes/feed-rss2.php file (just echo ‘test’), it also takes one or 2 hour to see the test word in, it means wordpress only […]

Best practices for multiple Custom Feeds functions

I created two new WordPress RSS feeds in my theme functions: // Custom Feed 1 add_action(‘init’, ‘customRSS’); function customRSS(){ add_feed(‘feedname’, ‘customRSSFunc’); } function customRSSFunc(){ get_template_part(‘rss’, ‘feedname’); } // Custom Feed 2 add_action(‘init’, ‘customRSS2’); function customRSS2(){ add_feed(‘feedname2’, ‘customRSS2Func’); } function customRSS2Func(){ get_template_part(‘rss’, ‘feedname2′); } It’s working perfect, however based on the DRY concept I feel that […]

A function to fetch blog content via rss feed

I am trying to make a function which take an rss fedd URL and fetches the most recent 2 posts. I have tried to remake the snippet from here to a full function in funtions.php as following. I don’t want to use a plugin for this since the plugins I have looked at have been […]