PHP Snippets

WordPress Resize at Upload Plugin mysql_real_escape_string() Error

June 26th, 2016|PHP Snippets, WordPress Snippets|

If like me you use the WordPress plugin Resize at Upload, or Resize at Upload Plus, it's quite likely that you'll be getting a mysql error when changing the settings.  Something like: Access denied for [...]

Google Maps Clustering IE Problem

June 10th, 2014|PHP Snippets, Web Programming|

If you're having trouble getting Google Maps marker clustering working on IE8, this little snippet may be of use. A client recently came to me with an issue whereby Google Maps were showing the clusters [...]

WordPress RSS Widget: Open Links in a New Window

June 4th, 2013|PHP Snippets, WordPress Snippets|

I've recently come across a slight problem with one of my clients whereby they wanted the RSS feed widget to open all incoming links in a new window. And why wouldn't they? Especially if they're [...]

Search and Replace in Web Files

June 9th, 2010|PHP Snippets|

This handy function will search and replace all instances of a search term in every file with the PHP extension, across all directories and subdirectories. Upload the file to your root directory and run it. [...]

Remove Trackbacks and Pingbacks from Comments

June 7th, 2010|PHP Snippets|

Unfortunately, the default Recent Comments widget also includes trackbacks and pingbacks and the sight ain’t so lovely thus I had to add this hack to weed out the trackbacks and pingbacks. Open your theme's functions.php [...]

How To Decode WordPress Base 64

May 1st, 2010|General, PHP Snippets|

1.  Open your index.php and find <?php get_footer(); ?> 2. Place a HTML comment that you can easily recognize, before and after Something like: <!– footer content starts Here –> <?php get_footer(); ?> <!– footer content [...]

WordPress Breadcrumbs

March 2nd, 2010|PHP Snippets|

Creating breadcrumbs in WordPress themes can be a pain.  With that in mind, this handy function should be exactly what you need. function waz_breadcrumbs() { $delimiter = '&raquo;'; $name = 'Home'; //text for the 'Home' [...]