Tag Archives: wordpress

Why I moved comments to Disqus

Running a blog, even a low-volume out-of-the-way blog like mine, attracts spammers. It’s a simple fact of life. If you have comments turned on, you will get spam. There’s lots of ways to deal with that, but no way to stop it coming. Lately, it’s been hammering the server hosting my blog, so I decided to change how I was dealing with spam by essentially outsourcing most of the problem to Disqus. Continue reading

facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail

Remove the WordPress post date filter on custom post type admin pages

WordPress custom post types can be very useful for storing all sorts of different types of data in WordPress — and I should really write a post about that some time. But the date a post was published, i.e. its post_date, isn’t important for many custom post types. So why have a drop-down list of dates to filter your custom posts types by if you don’t need it? Continue reading

facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail

Stop CloudFlare Rocketscript breaking WordPress plugin scripts

CloudFlare offers a service called Rocketscript, which compresses, concatenates, and defers any JavaScript on your web pages. On some websites, it can make a significant difference to the apparent page load time, because it waits until the web browser has loaded the page before it loads and executes scripts. Of course, that sometimes means it breaks things! Fortunately, CloudFlare offers a way to avoid that, and it’s possible to use it on your WordPress plugin scripts. Continue reading

facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail

Use WP Migrate DB Pro and keep your development environment settings

I’ve been using the fabulous WP Migrate DB Pro since June; it makes it really easy to duplicate the data from one WordPress website onto another, something that developers need to do frequently, and it handles the problems of moving serialised data from one server to another without breaking it. When pulling data from a production server to a development or test environment, it also (by design) replaces all your settings, which might mean that test emails go to your clients — can anyone say, “Dear Rich Bastard?” Thankfully, it also offers a couple of save-your-backside solutions. Continue reading

facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail

Replace query argument pagination with WordPress paged pretty URLs

When integrating non-WordPress PHP software into WordPress, sometimes the two butt heads over little things; pagination is one such thing. WordPress likes to move pagination into the pretty URL and out of query parameters. If your non-WordPress software generates content with URLs that have page= in query parameters, that means a redirect each time such a URL is fetched. A little regular expression magic can help fix that, with some assembly required. Continue reading

facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail

Add custom JavaScript actions to WP e-Commerce cart updates, again

I previously wrote about adding your own custom JavaScript actions to the WP e-Commerce cart update event. Of course, things change, people change, hairstyles change, interest rates fluctuate, WP e-Commerce moves goalposts, so there is a new way to do this since version 3.8.11 came out. Continue reading

facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail

Change the description on a Gravity Forms PayPal donation

Gravity Forms plus its PayPal add-on make for a very easy donations form (and so does my Gravity Forms eWAY add-on). But the PayPal item description is pretty formulaic, and probably doesn’t represent the donation very well especially when there are multiple options. A simple filter hook with a few lines of code can easily fix that though. Continue reading

facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail

WordPress WP_DEBUG_LOG without E_STRICT

As Debugging in WordPress explains, it’s easy to get good debugging information into a debug.log file while developing WordPress plugins and themes. Unfortunately, it sets the PHP error reporting level to E_ALL, which includes E_STRICT and can throw so much noise into the log that you can’t find the useful information. What we need is a way to turn on the debug log but specify the error reporting level. Continue reading

facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail

WooCommerce add to cart with quantity and AJAX

WooCommerce is a great e-commerce plugin for WordPress. It has some very nice basic features, but it’s also easy to customise and extend. On single product pages, you can add to cart with a quantity other than just one, and on the purchase page you can add to cart via AJAX without leaving the page. Wouldn’t it be nice to add to cart with both quantity and AJAX? Continue reading

facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail

Events Manager Pro and required user fields

Events Manager + Events Manager Pro is a great plugin team for taking bookings for events on WordPress websites. One hitch I’ve struck is that if you as webmaster need to edit a user, and the user hasn’t filled in all their details, Events Manager Pro won’t let you save without filling in all of its required fields (basically, address details). And of course, the chances are that you won’t know what those fields should contain. Continue reading

facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail