[Talk] Getting amped for AMP

I spoke at WordPress Joburg tonight on AMP, it’s possibilities and how to get going with it in WordPress. Check out the slides here and let me know if you have questions.

Get Custom Post Type by Slug

I recently had a case where I needed to get the post object for a custom post type in WordPress – I had to do this by a slug that the user passed in. There is a function (get_page_by_path) which I initially thought was to only find the post object for pages but it actually […]

Introduction to Continuous Integration with WordPress – WordCamp Cape Town 2016

At WordCamp¬†Cape Town 2016 I did a quick intro workshop into continuous integration with WordPress, which covered the principles of continuous integration (CI) and a few ways to start with unit testing and integration testing. Sadly, I didn’t have enough time to get through the entire workshop and really wanted to get people trying out […]

Strict Standards: Only variables should be passed by reference

I recently came across an interesting warning on one of my WordPress sites. The warning was “Strict Standards: Only variables should be passed by reference” and was referring to line 14. As you can see below, I wasnt’ really sure what the issue was here. if ($post->post_parent != 0) { // On child page $postID […]

Remove Protected Posts from Search Results in WordPress

I recently came up with a scenario on a website I created using WordPress which needed me to prevent protected posts from displaying in search results or on the blog index page. Initially, I thought this would be a setting on a per post page but alas, WordPress does not have the feature built-in. After […]

Using Variables to Dynamically Populate Fields in Gravity Forms

I was building a form using Gravity Forms (aff. link) on the Rivers website the other day and came across the need to add a variable used in the back-end of the site and place the value in a form. Gravity Forms does allow you to dynamically set the value of a field and you […]

Scheduling WordPress Post Tweets with WordTwit

I was doing a bit of research on the best times to tweet links to my posts and when the tweet would get the most views. There are a few times during the day when you can hit the sweet spot of user activity on Twitter but naturally 7am in South Africa is quite a […]