We have launched a new WordPress plugin GS2WP Calculator that allows a user to publish a web calculator (fully responsive) on WordPress.(Soon for all site also !) . But this plugin is capable of many things other than just a calculator. This post is, therefore, a tutorial in two parts:
- How to fetch feeds in Google Sheet?
- How to display those feeds directly from Google Sheet to WordPress.
How to fetch feeds in Google Sheet?
Let us say we want to fetch or display the fresh news from Google News, MSN, Yahoo & Reuters. Then , you can read latest news from these sources in the following two steps only :
Step 1: Collect the hyperlinks of RSS feeds from these sources.
- Google News : https://news.google.com/rss?hl=en-US&gl=US&ceid=US%3Aen&x=1571747254.2933
- MSN https://rss.msn.com/en-us/
- Yahoo https://news.yahoo.com/rss/mostviewed
- Reuters http://feeds.reuters.com/reuters/topNews
Step 2 : In a Google sheet cell , we need to put a special formula that do all the magic. You can read more in original Google help on importfeed formula
IMPORTFEED(url, [query], [headers], [num_items])
So , if we want to publish the Google News , we write as under :
Similarly , you replace the “items title” with items URL”, the url of the story will be fetched like
The mement , you insert this formula in a Google Sheet , you will see that ten numbers of latest news from Google News Feed is fetched automatically.
Video on RSS Feed in Google Sheet.
How to Display Feeds to WordPress from Google Sheet?
For this purpose , you need to install our GS2WP Calculator wordpress plugin and also install an addon for Google Sheet called GS2WP Calculator from addons directory. After that , you just need to fill ceratin details in the template that comes up and publish.