Display Your Latest Google+ Update on WordPress

Print View Mobile View

Earlier I had posted about a tool called PlusFeed that let users subscribe to public RSS feed of any Google+ user they wanted. Now using that app you can display your latest update from Google+ on your WordPress blog.

Latest Google+ Update
Latest Google+ Update

The update shows your entire post including attached images, videos or links, and optionally published date and time.

Here’s the code that you will need:

php
	include_once(ABSPATH.WPINC.'/rss.php');
	$googleplus = fetch_rss("http://plusfeed.appspot.com/100000000000000000001");
	echo '<a href="';
	echo $googleplus->items[0]['link']; echo '">';
	echo $googleplus->items[0]['summary'];
	echo $googleplus->items[0]['updated']; //Optional
	echo '';
?>

Code description and things that you need to change:

  • 100000000000000000001 :Replace with your own Google+ profile ID
  • items[0] : Update number to show. Ex. [0] to display the last update, [1] to display the second last update, and so on.
  • [‘summary’] : You can display either ‘summary‘ or ‘title‘ of your update.
  • [‘updated’] : This shows the post published date. It is optional.
That’s it. You can display your updates on any post, page or even in a widget on WordPress. Of course, this method is necessary, and should be used, only till Google releases Google+ API. (via)