Category Archive: Tutorials

PHP ‘include’, ‘get_template_part’, and ‘require’: Best Practices

Tutorials

Including files in a PHP environment can be tricky for new developers.  There are no less than four ways to include a file: include, include_once, require, and require_once.  Moreso, there’s very subtle differences in the reasons behind using each one.  Throw in WordPress (which has its own specific flavor of include tag – get_template_part) and it can be downright confusing.  Using the wrong one,…

Continue Reading

WooCommerce: Third Party API Calls At Checkout

Tutorials

I've been doing a lot more WooCommerce work as of late. And with good reason - WooCommerce (as of the end of 2016) powers nearly 42% of all eCommerce stores on the internet. One of the biggest requests I have when working with WooCommerce is how to integrate a third party vendor into a checkout screen. An example would be a gift card merchant.…

Continue Reading

How To Search A Specific Custom Post Type (Only!) in WordPress

Tutorials

If you’re like me, you use custom post types a LOT when you’re doing projects (or on your own site, if I’ve done it for you!).  There’s a lot of value in having a type of content that’s unrestrained and flexible.  Sometimes, however, you want to be able to search a particular post type, and leave out all of the other results (pages, blog…

Continue Reading

Add a Product List to WooCommerce’s Order Columns

Tutorials

If you’re running WooCommerce, the Orders screen is a great way to see – at a glance – what’s going on in your store.  However, there’s one thing that it absolutely doesn’t show: the products that people have ordered. The code below changes that – it gives you a special column in your Orders screen called “Products” and shows a quantity and product name…

Continue Reading