Latest Posts

wp-api-logo

Display a WordPress Plugin Download Box with Links and Download Count

We’ve only recently started to submit the odd plugin to the WordPress.org repository; our first two plugins (at the time of writing) being Lipsum and Hiztory. One of the things we wanted to provide in each post that referenced a plugin was an information box that contained a basic description, download link and, more importantly, […]

Zodiac

Find a Zodiac Sign by Birthdate with PHP

I’ve just finished adding a zodiac feature to a friends website. When a user logs in, they’ll have an entry page customised by location and other personal details. Here’s some very simple code that’ll determine a Zodiac sign given a birthdate. <?php function zodiac($birthdate) { $zodiac = ""; list ($year, $month, $day) = explode ("-", […]

dice

Add st, nd, rd, th to a Number with PHP

This simple function will add st, nd, rd or th to a cardinal number. There are plenty of these functions floating around but only a few take the subtle variances into consideration that can screw up the result. If you’re using PHP 5 >= 5.3.0 and you have PECL intl >= 1.0.0 installed, consider PHP’s […]

phpLogoDateArray

All Dates of a Year Into an Array with PHP

On one of our , we use a version of our to render a large amount of relevant to each day of the year (it’s actually an enhanced version of the plugin that we’re testing). As part of the process we had the need to generate a list of all the days in the year […]

hashtag

Extract #Hashtag Keywords from a String of Text with PHP

A hashtag is a word or an unspaced phrase prefixed with the hash symbol (#) that is used on various social websites to create (often distinct) social search terms that group various types of users and data (often collating data from various platforms). By clicking on a hashtag (essentially just a search term), you’ll be […]

share_this_icon

Display Total Number of Social Shares with PHP and WordPress Shortcode

Some time back I provided some dodgy code that would query various social services and provide a total count of the aggregated shares to various platforms. There were more than a few comments that asked how one could display the total number of shares similar to the way in which it’s used on Mashable.com. This […]

facebook-share-logo

Embed Facebook Posts into Your WordPress Post or Page with Shortcode

This post will show you how to embed a Facebook post into your WordPress post or page with shortcode. Although this post is dedicated to describing shortcode usage to achieve our desired result, it’s arguably not the most efficient short-term means of displaying post content on your page. In fact, the default Facebook embed code […]

googleFacebookRichSnippets

Open Graph Objects & Facebook – Creating Rich Snippets to Share on Facebook and Google Plus

Facebook’s Open Graph “helps people tell rich stories on Facebook from your website through a strongly typed API”. What this essentially means is that it permits you to structure your webpage in such a way that you can define various on your webpage (title, description, image etc.) to describe your as you would like to […]

facebook-share-icon

Facebook Share Shortcode for WordPress

Most of us are familiar with the Facebook share button. It’s normally integrated with other social sharing services – as it should be – but it can also be included on your website in isolation. This post will show you how to add a Facebook share button (with WordPress shortcode) that will share the current […]

facebook-subscribe

Add a Facebook Follow/Subscribe Button to Your WordPress Website with Shortcode

Against mounting competition from the likes of Twitter (and later, Google Plus), Facebook introduced the ‘subscribe’ button (now more commonly known as the ‘Follow’ button) back in September, 2011. It allowed those that weren’t friends on your Facebook profile to subscribe to those updates that you chose to make public. This post will show you […]

hook

Add a Hook in WordPress After the Opening Body Tag

There are numerous occasions where you’re required to add content (mainly JavaScript) directly after the opening <body> tag on your WordPress website. However, WordPress doesn’t natively support it. Instead, we rely upon theme developers to add that functionality… yet they rarely do. This post will show you how to add a hook on your WordPress […]

ipad

iCloud for Outlook/Windows – Does Apple Think I’m Stupid?

Recently, I began Living The Dream. Yes, that’s right – I have an iPad without giving any money to Apple. Not counting the Apps, anyway. Recently my company became perhaps the last airline in the country to equip it’s pilots with iPads, and so the choice not to choose Apple was removed from me. As […]