Tag Archives | wordpress

s2member logo

How to store billing address information from the s2member plugin

s2member, the membership plugin we use on Smart Insights, doesn’t store the billing address entered when people purchase memberships or products. I needed a way to be able to get access to that information, and here’s the solution I figured out. Why doesn’t s2member store billing address information? Storing cardholder data such as billing address […]

Continue Reading Comments { 0 }
Google Universal Analytics

Implementing Google Universal Analytics Measurement Protocol in PHP and WordPress

I’ve had some historic difficulty in being able to track ecommerce transactions in Google Analytics that happen ‘behind the scenes’ of the Smart Insights site – typically when PayPal sends an IPN message, server to server, for a subscription renewal in our case. Since those messages don’t touch the browser, you can’t use the Google […]

Continue Reading Comments { 19 }
WordPress memory

How to monitor and reduce WordPress memory usage by plugins

One of the best things about WordPress is that it’s so easy to extend your site’s functionality with the many (mostly) free plugins available on the plugin repository. But loading your site with too many plugins can cause your site to consume too many resources on your server, slowing your site down. So how do you […]

Continue Reading Comments { 14 }

Increasing the PHP timeout on NGINX for WordPress

I’ve been using a Vagrant development set up for a while now, which has introduced me to NGINX after always using Apache in the past. The transition has been fine in the main, though I had an issue yesterday with PHP scripts timing out on me, so needed to figure out how to extend the […]

Continue Reading Comments { 1 }
Mac Console

Sending your own output to the WordPress debug log

Every WordPress developer knows how to use WP_DEBUG in the wp-config.php file to enable the WordPress debug log. But how do you go about sending output to the WordPress debug log, so you can debug your own code while developing a theme or plugin? Every developer is familiar with using the old print_r($my_stuff); die; trick to […]

Continue Reading Comments { 4 }

Getting the WordPress current template name in posts and pages

Yesterday I needed to selectively hide breadcrumbs for particular WordPress templates, but had some issues with getting the WordPress current template name when needed, so I thought I’d share how I went about it. First things first – the way you go about it depends on whether you’re working with pages or posts – these are not seen […]

Continue Reading Comments { 5 }
A/B testing

Simple A/B testing in WordPress with Google Analytics site experiments

As we’re about to make some significant tweaks and changes to the main product pages on the Smart Insights site, I’ve looked at a lightweight way to do simple A/B testing in WordPress. What is A/B testing? You’ll probably be aware of the concept, I’m sure! A/B testing, also called split testing or multivariate testing, […]

Continue Reading Comments { 23 }

Disable WordPress notifications email for users and admins

I’ve just had two separate issues in two days which needed me to try to disable WordPress notifications email. WordPress sends a lot of automated email, and it’s not so easy to see how to change or suppress it. So I thought I’d share the solutions I found in case it saves anyone else time, […]

Continue Reading Comments { 6 }

A WordPress local development environment with Vagrant

I’ve used XAMPP as my WordPress local development environment for the last couple of years, but as I’ve done a lot of development on the Smart Insights site recently, it’s been frustrating me that my development environment doesn’t match with the live server. So I started looking into alternative solutions. I’ve recently migrated Smart Insights […]

Continue Reading Comments { 1 }

Does WordPress delete expired transients from the database?

Just the other day in Caching using the WordPress Transient API, I explained about using the WordPress Transient API to cache data in the database temporarily, the idea being that you set an expiry date and time against each, and WordPress automatically expires them when this is reached. So far so good, right? Not entirely. […]

Continue Reading Comments { 2 }