Archives for May 2014

The Great Escape of Houdini (the dog)

Minnows and dogs just go together.

Last week, we got an email from the fabulous (and minnow-y) designer who helped us with the Rocket Dog Rescue redesign, and lots of other projects. It read like this:

I am hoping you can help me. I know you have connections at Rocket Dog and I hoped you may be able to ask them on my behalf for help.

2 months ago someone dumped a small dog into our neighborhood. I saw him when I pulled up to my house and immediately could tell he was lost. No collar, his tail between his legs, he was terrified. I tired to get him, but he was too fast. I roamed the street for an hour and finally went home. There he was sitting on my porch as my wife came home. He ran off, of course, and I have been chasing him since. I put out flyers and received dozens of calls. I figured out his roaming schedule and decided to set a trap. I drove back and forth all day hoping I’d catch him, but nothing. He figured out how to get the food without triggering the trap. He knew when I would come and go. Needless to say, he was getting fat and I was getting tired. I told myself I would have to stop pursuing him by Friday and said a long prayer. As part of my last ditch I bought a better trap, went to KFC for chicken nuggets and set the trap one final time. Sure enough, I caught him! He’s now at the Berkeley shelter and being evaluated. We named him “Houdini”.

Now I’ve been talking with a dozen rescue groups to try and find him a foster home and NOBODY will take him because they are all full! I’ve offer medical help. I’ve offered to hire a trainer. NOTHING. He is fading FAST there. They said his chances of getting adopted are slim to NONE. He’s changes of euthanasia are HIGH. He needs to be socialized and to feel safe. He likes other dogs. Being under pressure and stress at the shelter he is now growling and unapproachable. He just sits in the corner. They haven’t even bathed the poor guy after a week of being there.

Do you think Rocket Dog can pull him, foster him and rehabilitate him? They are my last chance.

Needless to say, a few emails, a few texts, and a bit of logistical rigamarole later, Houdini is in the safe arms or Rocket Dog Rescue, where he will be evaluated, nurtured, and cared for until he can find his forever home.

It feels great to have our networks come together in this way. We have been pretty immersed in Rocket Dog Rescue for the last few years, and because they do the amazing and admirable work they do, we have invested in their success. But their work hadn’t yet touched our lives this personally. In this unique moment, when Kathy, a lover and protector of dogs (and a minnow), came upon a dog in need, Rocket Dog Rescue swung into action to do what we know they always do, what we’ve been helping them to do, and it felt magical.

Kudos to Kathy, who couldn’t leave a helpless dog out there alone in the world, no matter how inconvenient it was for her. And kudos to Pali (“the dog whisperer”, according to Kathy) for giving her life over to the welfare of dogs in need, and for inspiring so many other people to do the same.

We have long since been proud to be the pro-bono web team of Rocket Dog Rescue, and to help facilitate the wonderful work they do. But we are all the more pleased, proud and grateful now that their work has touched our lives so personally.


Pali & Houdini


Houdini getting a well-deserved rest


Kathy and Houdini, reunited at the shelter.

UPDATE June 1, 2014: A few short days after Rocket Dog Rescue accepted Houdini, he was adopted at a weekend adoption event. Renamed “Virgil”, he has already found his forever home.

Houdini / Virgil and his new girl!

Houdini / Virgil and his new girl!

How to Properly Move the Entire Site Footer in Genesis

How to properly move the Genesis site footerWe recently had the need to move the entire .site-footer div in Genesis. There are various tutorials out there that suggest using the following code to relocate your footer content:

However this won’t actually move the entire .site-footer div. On the contrary, it will only relocate the contents of the div, which means you’ll end up with:

  1. An empty .siter-footer div
  2. Your site-footer content orphaned somewhere on your page with no good semantic classes or IDs

Not good, right?

So if you want to properly move the entire site footer, use the following code (making sure to substitute the desired hook in place of new_hook below):

Mm Plugin: HTTP URLs

Use the simple [http-url] shortcode to convert any URL to either HTTP or HTTPS.

Why Use This Plugin?

The most common case for using this plugin is in conjunction with social media sharing/commenting plugins, in which data is tied to a specific URL. On sites that are visible via both HTTP and HTTPS, this means that two different sets of differing data are created for every page. HTTP URLs provides a handy solution to this common problem.

Visit the Plugin Page »

How to Synchronize Social Media Shares, Counts, and Comments Across HTTP and HTTPS

Social Media

The Issue

I use a social media, sharing, or commenting plugin and it shows different data on HTTP and HTTPS versions of the same page/post.

Viewed via HTTP

Viewed via HTTP

Viewed via HTTPS

Viewed via HTTPS

Why Does This Happen?

We build a lot of sites that use social media sharing and commenting plugins, such as:

And if you really want to boil it down to the basics, each of these plugins essentially does the same thing: associate data (comments, share counts, likes, etc) with a specific URL. Pretty simple, right?

The issue described at the very beginning of this article arises because HTTP and HTTPS versions of the same page look like two separate URLs to most of these plugins.For all intents and purposes, these two URLs are treated as separate pages by most plugins, even though they point to the exact same content. That little ‘s’ makes all the difference.

I imagine there are times when this separation is desirable, however we typically want HTTP and HTTPS versions of a page to be treated the same, so that all comments, likes, shares, etc. appear the same, regardless of which protocol is being used in the URL. If that’s what you’re looking to do, then read on. . .

The Solution

To solve this problem, we essentially have to do two things:

  1. Get the HTTP version of the current page/post URL.
  2. Pass this URL to the plugin.

1. Get the HTTP URL

This is the easy part. We generally use the following bit of code (which can be placed in functions.php):

In this snippet, we’re doing two things:

  1. Defining a function, get_http_url( $url ), which converts any URL to HTTP.
  2. Creating a shortcode, [http-url], which outputs the HTTP version of the current post/page URL.

Note: We could have combined these into one simple shortcode, however I prefer separating each bit of functionality out into it’s own function, so that we can use them later if so desired.

2. Pass the HTTP URL to the plugin

Now that we can generate the HTTP version of a post/page URL, we need to basically tell our plugin to use this URL (always HTTP) instead of the auto-generated URL (HTTP or HTTPS). How we accomplish this varies from plugin to plugin, so we’ll outline the basic steps and then give two examples below.

The Steps

  1. Figure out how to inject your HTTP URL in place of the auto-generated URL used by your plugin. Good plugins will have a well-documented way to do this. Decent plugins will have a way to do this. Bad plugins will have neither a way to do this, nor documentation (if this is the case, time to switch plugins).
  2. Use the shortcode you created above to insert your HTTP URL.


We’ll look at two examples: Share Buttons by AddThis and Facebook Comments Box.

Example 1: Share Buttons by AddThis

Share Buttons by AddThis
By default, this plugin will automatically use the current post URL to send and retrieve associated share counts. Fortunately, this plugin falls into the “good” category, as it provides a simple method and clear documentation for overriding the default URL using the addthis:url attribute.

So, say we’ve created a text widget that displays our share buttons. Out of the box, the HTML looks like this:

If we want to ensure that our sharing buttons will always reference the HTTP version of a page’s URL, and likewise ensure that our share counts are the same regardless of which protocol we’re using to view the page, then we can easily use the addthis:url attribute along with our [http-url] shortcode like so:

NOTE: you’ll need to make sure shortcodes are enabled inside widgets, which you can do by adding add_filter('widget_text', 'do_shortcode'); to functions.php.

Presto! Our share counts are now the same whether we’re viewing HTTP or HTTPS.

Example 2: Facebook Comments Box

This plugin is a little trickier, and falls somewhere between “good” and “decent”. The plugin does provide us with a handy filter, facebook_rel_canonical, however the documentation is pretty tough to track down. According to the plugin’s readme.txt file, the facebook_rel_canonical filter “affects Open Graph protocol URL definitions, URL references sent in Open Graph actions, and more.” Kind of obscure, but sounds like we’re in the right place.

So, whereas before we we’re simply outputting some custom HTML, this time we have to use WordPress’ native filters API to substitute our HTTP URL for the plugins default URL:

Just include this snippet in functions.php and you’re ready to go! Comments will now all be associated with the HTTP URL of any given post/page.

In Conclusion

While the details may vary depending on what plugin you’re using, the essential principals remain the same:

  1. Get the HTTP version of the current URL.
  2. Pass this URL to your plugin.

I find that sleuthing around different plugins to figure out how to pass in my custom URL is actually a pretty enjoyable (though sometimes time-consuming) task. I inevitably learn more about how the plugin works, and usually discover a handy trick or two along the way.

And if you run into a brick wall and just can’t figure it out, always feel free to file a support request or email the plugin author.

And if that fails, you can always contact us – we love a good challenge.

And if that fails. . . well. . . time to switch plugins 🙂