Code Snippets

Showing 21 to 30 of 36 posts.


Posted on August 27th, 2014 by Graeme

Using an interface

How to define and implement an interface class

Read more...


Posted on August 12th, 2014

Interface or Abstract class

“An Abstract class without implementation just looks like an Interface..”

Read more...


Posted on August 4th, 2014 by Graeme

RSS namespaces

Here we use a sample bit of RSS that contains two thumbnails, which belong to a namespace.

Read more...


Posted on July 17th, 2014 in PHP, WordPress by Graeme

WordPress infinite scroll

How to implement infinite scroll in WordPress by setting a post offset value for pagination

Read more...


Posted on April 30th, 2014 in JavaScript by Graeme

jQuery binding tip

This is a good little trick I’ve just picked up, which allows you to bind multiple functions to the same event (e.g. click), without each of the functions effecting the other.

Read more...


Posted on March 14th, 2014 in PHP

PHP Explode

How to use PHP exlode

Read more...


Posted on March 4th, 2014 in WordPress by Graeme

Creating a WordPress shortcode

Shortcode demo of a function returning the URL of the WordPress site.

Read more...


Posted on February 19th, 2014 in WordPress by Graeme

Woocommerce 2.0 plugin hooks

How to upgrade an old WooCommerce plugin to be compliant with WooCommerce 2.0

Read more...


Posted on February 4th, 2014

SCP Command - local to remote

To copy a folder from a local machine to a remote server, you can use the SCP command.

Read more...


Posted on February 2nd, 2014

CSS checkbox alignment

Using vertical-align to align checkboxes

Read more...