Development

Category icon

Get a query column value by index in Coldfusion →

Posted on May 7, 2012 in Development with 0 comments.

Just a neat little Coldfusion query tip that I found out today. If are are looking for a single column value in a Coldfusion query result set and you know what the number of the row (index) that the value resides in, then you can use the following code snippet it to fetch that column [...]

Continue Reading →

Category icon

Find the last element of a PHP array within a loop →

Posted on May 6, 2012 in Development with 0 comments.

I see a lot of developers using a count to find out if they are at the last element of an array. Let’s look at a quick example: <?php $array = array( ‘blue’, ‘green’, ‘red’ ); $count = 0; foreach ( $array as $a ) { $count++; if ( count( $array ) == $count ) [...]

Continue Reading →

Category icon

Location based content in PHP using IP addresses →

Posted on April 30, 2012 in Development with 0 comments.

With the internet being a globally accessible resource, there may come a time when you want to display different content to your website visitors based on their location. For instance, if you are a consultant you may want to display a US dollar hourly rate to people viewing your site from the United States and [...]

Continue Reading →

Category icon

Blog design tip: add a link back to your websites homepage →

Posted on February 23, 2012 in Development with 0 comments.

This is more of a short rant with a tip at the end of it There is nothing more annoying than visiting a blog, be it via Google, a twitter link or however you end up on the blog and browsing the blog and then deciding to view the company/product home page, only to find [...]

Continue Reading →

Category icon

How to add the TinyMCE editor to a WordPress meta box or plugin form →

Posted on February 7, 2012 in Development with 0 comments.

I’ve worked on a number of WordPress sites and custom plugins recently where I have needed to add the TinyMCE editor to a meta box that was added to a post type and/or a custom textarea fields in a plugin. Pre-WordPress 3.0 this was quite difficult and required a bit of hacking, but luckily since [...]

Continue Reading →

Category icon

Quick tip for WordPress developers: Use the WP_DEBUG constant →

Posted on February 3, 2012 in Development with 0 comments.

Over the past few years I have worked with many different WordPress plugins and themes, both on my own websites and on my clients websites. During this time, I have noticed something that a lot of developers are doing that they shouldn’t be doing. I’m talking about developers not using the WP_DEBUG constant when building [...]

Continue Reading →

Category icon

Symbolic links on a Mac (OS X) →

Posted on January 23, 2012 in Development with 0 comments.

If you are a developer and have not come across symbolic links before, then you need to read this blog post. Symbolic links are extremely useful if you hate copying and pasting duplicate files and folders in different places/projects. So what exactly are they? Simply speaking, they are a virtual link or shortcut between a [...]

Continue Reading →

Category icon

How to ignore WordPress pagination and display all posts on a page →

Posted on January 19, 2012 in Development with 2 comments.

There are times when you want to display a list of WordPress posts (or even custom post types) on a page and not have them paginated into multiple different WordPress pages. For example, you may be creating an archive page and instead of showing just the latest 10 posts in your category, you want to [...]

Continue Reading →

Category icon

Escaping input to the PHP mail() function →

Posted on January 15, 2012 in Development with 0 comments.

I recently built my email contact form on this website and thought I would share with you the method which I used to escape input to the PHP mail() function in order to avoid security vulnerabilities on your own contact form. You may think that the mail() function is a relatively safe function and data [...]

Continue Reading →

Category icon

WordCamp Cape Town 2011 slides →

Posted on September 16, 2011 in Development with 1 comment.

I just got back yesterday evening from WordCamp Cape Town 2011. This years WordCamp was organized by Ashley Shaw and his team at LightSpeed. It was definitely one of the better run conferences that I have been to and I learned a ton. I gave a talk on using WordPress as a mobile publishing platform. [...]

Continue Reading →