Browse Site

Category Archives: php

Add a Featured Image to your WordPress Theme

If your theme doesn’t make use of WordPress’s featured image out of the box, then all you need to do is to add the following lines of code to your functions file; add_theme_support( 'post-thumbnails' ); add_filter( 'the_content', insert_featured_image, 20 ); …

Read More

Posted in php, WordPress | Tagged , | Comments Off

Registering / Unregistering WordPress Scripts in the Header

The background behind this one is that I needed to alter the JavaScript filenames used within a plugin, font-resizer (which I would heartily recommend) in order to prevent an http 406 error being thrown which in turn was breaking all …

Read More

Posted in Blog, Blogging, php, Web, Websites, WordPress | Comments Off

What is an http 406 Error?

While working on a site for someone who had sorted out their own hosting, with a hosting company I’d not used before, I came across an http 406 error on installing a WordPress site that had worked fine in my …

Read More

Posted in php, Web, Websites | Comments Off

Get WordPress to send comment alerts

Do you ever wish that your WordPress plugin let you know when someone’s left a comment on your site? I run this script on a cron job which runs hourly and does exactly that… require_once('../wp-config.php'); // this gets the database …

Read More

Posted in Blog, Blogging, Geeky Stuff, php, Web | Comments Off

php SOAP Service with XML

I was given the task of calling a web service in php recently that formats the parameters as an XML (Extensible Markup Language) document. As I’ve always housed parameters in arrays before for soap calls, and usually utilise XML web …

Read More

Posted in Geeky Stuff, php | 2 Comments

E-Mail: About As Secure As …. erm …

I wasn’t going to post this (and by the time you get to the end of the post, you may wish I hadn’t!!), as I thought that the e-mail message had finally arrived by 2012. It appears not… In a previous …

Read More

Posted in Geeky Stuff, php, Rant Central, Systems | Comments Off

Using the Magento API via php SOAP

The Magento API has a lot going for it, and the documentation is pretty good too (at The functionality that the API offers you outside of the usual scope of the site is immense, to the point that you could …

Read More

Posted in Geeky Stuff, php | Comments Off

Developing with CURL behind a Proxy

I carry out site development in a local development environment (LAMP, WAMP, MAMP, XAMPP, etc.) on a network that sits behind a proxy server. The production environments that those sites end up working from don’t suffer the same proxy-based hardship …

Read More

Posted in Geeky Stuff, php | Comments Off