Okay, so some of you may have noticed I have added the Google +1 button to my blog posts, and here’s how to do it:

Please note, this does NOT affect wordpress auto-updater as you do not edit any wordpress files.
Also, you need to allow wordpress admin to edit theme files – If you do not know how to do this, ask your server administrator/hosting company.

So, first we need to go to your WordPress dashboard, Appearance and then Editor:

Then we need to find “Header” or “header.php” on the right hand side of the page.

Find the following line in the file:

Enter this row down, and insert the following above:

<script type=”text/javascript” src=”https://apis.google.com/js/plusone.js”></script>

It should look something like this…

Now all you need to do is edit the Index, Archive and Single Post pages to have the following line of code wherever you want to show the +1 button:

<g:plusone size=”small” href=”<?php the_permalink(); ?>”></g:plusone>

If you have any questions, please ask in the comments below.

Niall (:

Okay, this is really simple to do… all  you need is a facebook account with a profile picture and a HTML/PHP website.

To get your full profile picture on your site use the following:

<img src="http://graph.facebook.com/{user_id}/picture?type=large" alt="Facebook">

Remembering to change {user_id} to your user ID on facebook (eg. Mine would be MrNiallDavies)

However, if you want just the small image (the avatar that shows up next to your posts) you can use the following:

<img src="http://graph.facebook.com/{user_id}/picture" alt="Facebook">

Remembering to change {user_id} to your user ID on facebook (eg. Mine would be MrNiallDavies)

Thanks… (:

Okay.. you may have or may not have noticed that I have made some coding changes to the site, I now have the menu, header, footer and image in seperate files and using PHP Include I have “embedded” them in to the page.

You will notice now that on the main site the photo is chosen at random (out of 4 or 5 photos I think), I like this because it means i can add more photos or change it at a later date.. this is also in a document i am using for PHP include, so if i wanted to add more photos I wouldn’t have to edit every page to do it.

I know, i havent yet changed the theme on my blog and it is “default” i will be getting round to this but at the moment i have more important things to do.. I have had to find time to even write this blog post….

Just to be geeky.. hehe, here are the pages that are used in PHP Include (If you have time to take a look)


This means i can change say the “menu.php” document and it will change the Menu on every page…

Also on image.php you will see that it shows a random picture, like it does above the Links bar..  here is the coding that makes that work (It is quite complicated but oh well)

Function ShowRandomPic()
/* show a random pic */
$pics = Array();

/* define pics here, start from 0, no gaps between numbers allowed */
$pics[0]["src"] = "cool.jpg";
$pics[0]["txt"] = "Me =)";

$pics[1]["src"] = "fueholiday2007.jpg";
$pics[1]["txt"] = "Fuerteventura 2007";

$pics[2]["src"] = "beer.jpg";
$pics[2]["txt"] = "Enjoying Glass of Beer =)";

$pics[3]["src"] = "bass.jpg";
$pics[3]["txt"] = "Playing bass in Eric's studio";

$pics[4]["src"] = "blue.jpg";
$pics[4]["txt"] = "Niall's blue hair";

/* end of pics */

/* make random number generator more random */
srand((double) microtime() * 1000000);

/* choose a random number */
$i = rand(0, (count($pics)-1));
$img = $pics[$i]["src"];
$txt = $pics[$i]["txt"];

/* output the tag */
echo ""$txt"";


Its i suppose quite hard to understand for a beginner, for people who understand PHP, they will know what that means.

So yh.. some major changes (mainly PHP Include) and also the “updating picture thing”

Thanks for reading,
Niall =)