Adding GET params to a URL in WordPress with add_query_arg

I am finding myself using this function a lot now, and I constantly forget the function name:

add_query_arg();

It allows you to pass in some additional parameters, and a URL, and receive back the URL with the query string params added. For example:

$some_url = "http://simonwheatley.co.uk/?stuff=whatever";
$params = array( 'wp_siteurl' => "http://www.example.com" );
$some_url = add_query_arg( $params, $some_url );

This will result in a url something like this:

http://simonwheatley.co.uk/?stuff=whatever&wp_siteurl=http%3A%2F%2Fwww.example.com

Pretty cool, huh? So now you don’t need to worry about what parameters are already in the URL, you can just hand all that hassle to add_query_arg.

Update: See also remove_query_arg.

Plugins in the DFID site

I’m chuffed to see Puffbox and the Department for International Development (DFID) launch the new DFID group blog. Naturally it’s always nice to see our government open up to us, the people of Britain, but I’m particularly gratified that they’re using some of my WordPress plugins to do it.

Continue reading “Plugins in the DFID site”

Closing all the Photoshop layer groups at once

The great thing about Twitter is the ability to ask all my talented friends for solutions to immediate problems, in the same way as I might turn around in an office and ask questions of my nearby colleagues. All well and good, but the question and the answer aren’t collated which is mildly frustrating and not Google friendly. Here’s a recent useful exchange:

Me: Is it possible in Photoshop to collapse all layer palette groups in one single judo UI operation?

McJim: Command + click on little triangle thingy

…closely followed by…

Strawbleu: Liking the term ‘Judo UI Operation’

Thought some of that might be useful to someone, as I did Google for it but couldn’t find an answer. Thanks to McJim for the answer.

BarCamp Leeds – “my last project”

If you’re attending BarCamp Leeds, I need YOU.

I’d love to know what you’ve been up to recently, and what better way to find out than for you to tell me (and everyone else) as part of an open mic “my last project” session.

Continue reading “BarCamp Leeds – “my last project””

There’s a new blog at Upstairs!

Today we’ve launched a blog for my client, Upstairs Communications. The proprietor and brains of the operation, Rosie Fyles, has an excellent turn of phrase and a lot of experience in her field of Internal Communications so I can recommend bookmarking the site, or adding the feed to your newsreader.

Ideas for my Council (update)

Guy Dickinson and I have submitted our proposal for “Ideas for My Council” to Building Democracy, a new initiative from the Democratic Engagement Branch of the Ministry of Justice (what a fantastic department name). The competition is not dissimilar to Show Us a Better Way from Tom Watson & co., to which we’ve also submitted this proposal. You can view our proposal on the Building Democracy site.

Various of the previous projects were run by the awesome My Society, e.g. Fax Your MP which became WriteToThem, so winners of this competition would be in good company. 

Fingers crossed.

Great presentations – or death to bullet points

I’ve spent a fair amount of the day today looking into fantastic presentations, and what makes them look fantastic. Presentations are really hard aren’t they? Getting up in front of people. Putting your points and ideas up there to be criticised. We need to give ourselves the best chance of interesting and engaging people, to increase the chances of a better.

Continue reading “Great presentations – or death to bullet points”

The first WordCamp UK was a cracker

I spent the weekend in the company of 50 or so other WordPress users, designers, developers, the odd Aussie Automattician, and a WordPress lead developer at the first WordCamp UK. It was great to meet a such a varied and interesting group of bloggers and blog makers, many of whom I’m going to have to wait until next year to properly talk to… a weekend is just too short!

Continue reading “The first WordCamp UK was a cracker”

Following hashtags with a Fluid app for Summize, errr, I mean Twitter Search

Just put together a quick Fluid app for Twitter Search. (Fluid is a Mac specific browser designed to be used with just one app, and together with it’s user scripts, think Grease Monkey, you can mimic basic application functionality.

I’ve just put one together which tracks the Twitter conversations around one Hashtag using the new Twitter search, and a Javascript which refreshes the window periodically.

To do this you will need to:

  1. Download Fluid
  2. Download the Twitter auto-reload script
  3. Download my lovely Hash Tag icon
  4. Open your Fluid app
  5. Enter the URL for your Twitter hashtag search, I’m at WordCamp UK so I entered: http://search.twitter.com/search?q=%23wordcampuk as the URL (you can obviously change the Hashtag in the search as appropriate).
  6. Give the Fluid app a memorable name
  7. Pick an icon (the one linked above is quite pretty)
  8. Click “Create”
  9. Select the curly script icon from the menubar (to the right of the “Window” menu) and choose “Open Userscripts Folder”
  10. Drop the Twitter auto-reload script into the folder (then close it)
  11. Go back to the script menu, and choose “Manage Userscripts”
  12. Check the box to enable”Auto reload”
  13. Ensure that Include has only one entry of “*” and Exclude is empty then close the dialog
  14. Refresh the window to kick off the new script (Apple+R)
Enjoy.

Â