Category: Tutorials


Google Analytics – things that I think are essential

Posted on 21st March, by admin in Musings, Tutorials. No Comments

There are a couple of things that I would say are really, really important to set up if you’re using Google Analytics and want to properly measure campaign activity/effectiveness. The first thing is to include UTM tags in all your links and the second is to properly set up goal-tracking on your site.

UTM tags and Google’s URL Builder

Google are pretty good at providing you useful, free tools for getting the most out of their various products. Unfortunately they’re quite bad at putting these tools in an easy to find place, and they’re even worse at explaining how to use them! If you send out 3 email newsletters surely you want to be able to find out which of these sent traffic to your site and what these visitors did whilst they were on your site, similarly you want to be … Read More »


Playing with YouTube feeds

Posted on 1st March, by admin in Tutorials. No Comments

This is a followup to my Simplepie post a while back. YouTube offers Atom feeds, great – you’d think. However the data that YouTube outputs in its Atom feeds is…a bit different to what you might expect from a standard RSS feed in that it contains a lot of escaped HTML. Essentially for each item’s descripton in the feed YouTube outputs something like the following:

<div style=”font-size: 12px; margin: 3px 0px;”><span></span></div></td>
<td style=”font-size: 11px; line-height: 1.4em; padding-left: 20px; padding-top: 1px;” width=”146″ valign=”top”><div><span style=”color: #666666; font-size: 11px;”>From:</span>
<a href=”http://www.youtube.com/profile?user=YouTube”>YouTube</a></div>
<div><span style=”color: #666666; font-size: 11px;”>Views:</span>
15774</div>

Which is basically a div that contains a table and is pretty intrusive if included in it’s native form. A rough and ready solution to just getting the bits you want (or at least I want) is to grab each … Read More »


WordPress snippet #1

Posted on 21st February, by admin in Interesting things, Wordpress. No Comments

Useful little piece of WordPress code, plays a particularly useful part of a dynamic featured post slideshow that I was going to detail at some point. To reference the  set upload directory url in your WordPress theme:

<?php $upload_dir = wp_upload_dir(); ?>

<?php echo $upload_dir['baseurl']; ?>

more info here http://codex.wordpress.org/Function_Reference/wp_upload_dir


CSS – speeding things up

Posted on 30th June, by admin in Tutorials. No Comments

A bit of house-keeping (for wont of a better word) first, I’ll be moving this blog in the next couple of weeks to integrate with my website www.bigthingsandlittlethings.co.uk. When I first set this blog up I wasn’t entirely sure what form it was going to take but I’ve managed to keep it quite web-relevant (thus far) so it seems silly to keep two separate identities running when really they are parts of the same thing….

Now, boring stuff over, on with the blog.

This isn’t a hugely technical blog this time but covers a few CSS-related things that I have found make a big difference to workflow and just generally making things a bit easier to organise and manage.

I came across the notion of CSS ‘global resets’ a few years ago, to me they make a great deal of sense, … Read More »


WordPress – styling by category

Posted on 19th June, by admin in Tutorials. No Comments

I’ve spent the best part of this morning working out how to add a post’s category to its h2 tag’s class – which then allows me to do category-specific styling. Essentially I wanted each headline to be a different colour based on its category – simple result, slightly convoluted solution.

Anyways, it took a while so I thought I’d share it here to save others the hassle!

You first need to add the following to your functions.php file

<?php
function the_category_unlinked($separator = ‘ ‘) {
$categories = (array) get_the_category();

$thelist = ”;
foreach($categories as $category) {    // concate
$thelist .= $separator . $category->category_nicename;
}

echo $thelist;
}
?>

Basically this takes the results of the usual the_category() query – i.e. an unordered list – and strips out all the list formatting and presents the results as a nice list of the categories, with each category separated by a space.

You can then add this … Read More »




A selection of posts

Lazy boy

I realise I haven’t written anything useful for ages, and I’m not about to break that run now.

However Chris Unitt writes lots of useful...

ACE annual submission

As part of my day job I’ve just had to fill out part of Opera North’s annual Arts Council submission. The ‘digital’ section is...

Cookie Monster

So something that seems to have been exercising the worry muscles of quite a few colleagues of late seems to be the latest EU...