Author Archives:

Display the Post or Page slug in a WordPress theme template

It’s crazy that you have to add this function in yourself. But… you do. Firstly open up functions.php and paste the following in anywhere, like, ahh, at the very bottom: function the_slug() { $post_data = get_post($post->ID, ARRAY_A); $slug = $post_data['post_name']; return $slug; } And now, in your template, display the slug thus: <?php echo the_slug(); [...]

Remove ugly Skype reformatting for phone numbers on your site

If you’re a typography nark then you might have encountered this issue when building your meticulous design. Is your local installation of Skype reformatting the phone numbers on your website? Does it make it look real bad? Do you not care that people might miss out on the click-to-call functionality? I don’t! The trick is to make [...]

Redirect your site for mobile devices, in particular iPhone, iPod and iPad

This isn’t exactly an elusive solution to find all over the internet, but here it is regardless. Put these in your <head>. This first script is for generic mobile devices, redirecting to a folder I’ve called mobile: <script type=”text/javascript”> <!– if (screen.width <= 699) { document.location = “mobile”; } //–> </script> And here is another which [...]

Clipboard or print screen or ctr paste not working with Photoshop

Gaaaa this drove me crazy for like 2 years because I could never work out what the actual problem was. And being so erratic, it was never worth tracking down. In short… if you ever have an issue where you hit PrintScreen or Image>Copy from a browser or somewhere, and then try and Paste into [...]

The correct way to style hyperlinks / a tags in CSS

CSS best practices… here’s how to style a hyperlink properly, states accounted for, ordered correctly. Do this when you’re just starting out on your CSS file save annoying nigglies down the track. a:link {blah:blah;} a:visited {blah:blah;} :link:hover, :visited:hover {blah:blah;} :link:active, :visited:active {blah:blah;}

Display a Google Map in a hidden div, in a Drupal 6 node template, given values from CCK Location inside a CCK Multigroup

This was a real gnarly one. So I’m not going to describe the problem – I figure if you got here via Google, then you have a similar setup sequence as in the title of this post, and subsequently you’ll be hurting real bad and willing to look at any freakn’ code. CCK Multigroup for [...]

Give Facebook a standard image from your site to display on streams

When publishing a web page URL in a Facebook status, FB magic will try to identify an image to thumb up with the post. The image / images it finds are often totally irrelevant, pulling from a widget or an ad or something else on your page.  Sometimes, for whatever reason, it doesn’t actually offer [...]

jQuery show/hide div causing page to clunk when scroll-bars are activated

For our first post I’ll start with one of my recent favorite quick-fixes. I had a very simple site that was displaying content by showing and hiding blocks using jQuery. The problem was, when there was lots of content being revealed, the browser’s vertical scroll bar was activated, and vice versa. This caused the page [...]

White Mope’s web things blog

WELCOME TO OUR BLOG. White Mope (www whitemope.com) is three-strong web design firm based in Sydney, Australia. As we learn stupid little tricks that make the internet work, we’ll post them here, for us to archive and for you to discover via some wild Google search. We’ll try to avoid extended geek-ham explanations and patronising [...]