My web development blog collects posts I’ve made solving problems for my clients. There’s hints, tips and code snippets for all the open source frameworks I work with: WordPress, WooCommerce, OpenCart, Drupal, Magento and more. If you have a web development question, get in touch or post a question in the comments, I’ll try my best to help.
A regular expression to remove a particular shortcode from WordPress posts using search and replace, while leaving the content intact.
Perform a bulk search and replace of WordPress post content using an SQL query in the database. And find out about alternative methods.
Create a WooCommerce coupon in code using the woocommerce_get_shop_coupon_data filter. Useful for validating a coupon with an external API.
Learn how to log every action and filter hook call in WordPress. Identify which processes are running and which are resource intensive and need optimising.
From OpenCart version 220.127.116.11, the built in WorldPay payment gateway no longer takes transactions for WorldPay Business Gateway, but was changed to connect to WorldPay Online Payments API. Find out how to install the old gateway on newer versions of OpenCart.
Add a set of social sharing buttons to your Divi theme, without installing a plugin and using the built in icon set.
Divi’s blog module displays an ugly “No results found” message for empty categories. Find out how to hide this message.
Gravity Forms offers a very nice multi-file upload function, allowing multiple images to be attached to a form. This snippet counts the number of uploaded files and submits the count as a read-only field on the form.