Three Ways To Display Your Latest Google+ Updates On WordPress

in WordPress Tutorials

The Google+ Project has been growing rapidly since it’s launch. Many are tipping the service to steal a huge chunk of FaceBooks traffic. Although I have signed up, I haven’t posted much on Google+ as I have been busy over the last few weeks, though I can certainly see the appeal of the service, particularly it addresses the main issue with Facebook by allowing you to allocate friends into different circles.

Today I will be showing you three ways to can show your latest updates from your Google+ profile on your WordPress website.

1. Display Your Latest 5 Google Updates On WordPress Blog

In this tutorial Nilesh Shiragave walks you through adding a function called google_plus_feed to your functions.php file and then shows you the code you need to add to your template.

The following code needs to be added to your functions.php file. To change the number of updates, simply modify $items=5 to $items=10, $items=15 or whatever.

function google_plus_feed($id,$items=5)
        $rss = fetch_feed($feed);
        if (!is_wp_error( $rss ) ) : // Checks that the object is created correctly
        // Figure out how many total items there are, but limit it to 5.
        $maxitems = $rss->get_item_quantity($items);
        // Build an array of all the items, starting with element 0 (first element).
        $rss_items = $rss->get_items(0, $maxitems);
        <?php if ($maxitems == 0) echo '<li>No items.</li>';
        // Loop through each feed item and display each item as a hyperlink.
        foreach ( $rss_items as $item ) : ?>
        <a href='<?php echo esc_url( $item->get_permalink() ); ?>' title=''>
        <?php echo esc_html( $item->get_title() ); ?></a>
        <small><?php echo 'Posted On'.$item->get_date('j F Y | g:i a'); ?></small>
        <?php endforeach; ?>

You can then display your latest google+ updates by adding the following code to your appropriate template (e.g. footer, sidebar). Make sure you modify the code to include your Google Plus ID.

google_plus_feed('100104078886116260091',5); /* Replace 100104078886116260091 with your google Plus ID */

2. Display Your Latest Google+ Update on WordPress

Renji shows you how to show updates by calling the RSS feed of a users Google+ profile. You do this be apending a users Google Plus ID to the end of

For example, my Google Plus URL is therefore my ID is 110549232980674026623. So to access the RSS feed of my public profile you would use

I could then call my latest Google+ updates by inserting the following code into one of my theme templates.

	$googleplus = fetch_rss("");
	echo '<a href="';
	echo $googleplus->items[0]['link']; echo '">';
	echo $googleplus->items[0]['summary'];
	echo $googleplus->items[0]['updated']; //Optional
	echo '';

You would obviously have to change 110549232980674026623 to your own Google profile ID (or the ID of the profile you want to display). If you want to just show the title of the update you need to change ‘summary’ to ‘title’. The ‘updated’ line displays the published date.

Check out the full tutorial for more information on this method works :)

3. Google+ Plus WordPress Widget

Those of you who don’t feel comfortable editing templates may want to consider using the Google+ Plus WordPress Widget. To use the widget you simply need to enter your Google Plus ID and set the number of updates you want to show. Then simply add the widget to your chosen widget area (e.g. sidebar, footer, header etc).

Google+ Plus WordPress Widget

Know of any other methods to display Google Plus on your WordPress blog? If so, please share them in the comment area :)


Comments (1)

  • Comment by thinsmek

    This is good for those who use can use Google+ (I’m under “a certain age” according to my Google Account),

    Is it possible to make similar “latest posts” stream for +1s? Can one can have a lot similar widget to this updates widget or twitter streams for +1s to display on their wordpress blog?