This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Simple Google News

Description

This plugin can be used in two ways: through a widget, or with shortcodes.

The ‘Simple Google News’ WordPress plugin makes it easy to display Google News results on your WordPress site’s posts or pages by using the following shortcode:

[google_news]

Available Parameters

There are a handful of optional parameters that you can use to customize the output to your liking.

queryDefault: none. Use this if you want to search Google News for a particular word or phrase.

limitDefault: 5, Max: 10. Using the ‘limit’ parameter, you can set the maximum number of results that you would like to display on your post or page.

imagesDefault: on. Images are turned on by default. If you would like to turn them off, set the images parameter to ‘off.’ Note: Not all news stories will have an image.

lengthDefault: 200. The length parameter lets you control how many characters of the description (rounded to the nearest complete word) should be shown.

regionDefault: us. With the ‘region’ parameter, you can choose to show news from a particular part of the world. To see the list of currently supported regions, visit link. Note the ‘ned’ parameter that’s present in each region link. For example, India’s ned parameter is set to ‘in’. That is the value you would use to display news from that particular region.

sortDefault: relevancy. This parameter gives you additional control over the results that are returned. Here is a list of acceptable values:

  • r (for relevance)
  • n by date(newest first)
  • d by date(newest first with duplicates)
  • o by date (oldest first)

topicDefault: none. If you want to display news by topic (ie: technology, entertainment, etc), you can do so with this parameter. For example, if you wanted to show technology results, you would set your shortcode to something like this:

[google_news limit=”2″ topic=”t”]

Note: the topic parameter overrides the query parameter. So if you tried to do something like:

[google_news query=”android” topic=”t”]

Google News would ignore the query.

Here are the acceptable topic values:

  • b (for business)
  • t (for technology)
  • e (for entertainment)
  • s (for sports)
  • snc (for science)
  • m (for health)
  • ir (for spotlight)

Screenshots

  • This is a screenshot from my site, where I've used the shortcode to display news about Google.

FAQ

I’m using the shortcode and nothing is happening!

A couple things could be going on. First, your search may not be returning any results. Verify that the search is good by visiting news.google.com and trying your search there. Second, you may have provided some invalid values for the shortcode parameters. Doublecheck them.

Can I search for an exact string using quotes?

Yes! You just need to make sure that you’re wrapping the double quotes in single quotes, like so: [google_news query='”Android Sales”‘]

Reviews

Read all 6 reviews

Changelog

2.0.0 – Added widget functionality. You can now display Google News results in your sidebars.

1.2.0 – Added the ability to sort results by date

1.1.0 – Added relative time to each result so you can see how new each article is.

Contributors & Developers

This is open source software. The following people have contributed to this plugin.

Browse the code