Extending WordPress Posts By default, WordPress posts include a Title and the Content. If we want to store additional information with a post, we need to store it somewhere. In this example, I want to look at adding a Subtitle to a post. I’ve presented this topic at conferences and the slides for my Introduction […]
Dev Tips
CMB2 Dependency with Composer
Here is the short answer for how I installed CMB2 as a dependency with Composer for my plugin. { “require”: { “cmb2/cmb2”: “^2.2” }, “autoload” : { “files”: [ “vendor/cmb2/cmb2/init.php” ] }, “extra”: { “installer-paths”: { “vendor/cmb2/cmb2”: [“cmb2/cmb2”] } } } Details of composer.json Require The require section, tells Composer the package (and version) we […]
Contributing on GitHub
When I first started contributing to projects on GitHub, I had a difficult time with keeping my work and the original project in sync. Eventually, I found a way that works for me. Step 1: Fork the Repository I do this with the GitHub fork button. As an example, if I wanted to contribute to […]
Genesis Starter Theme
As a WordPress developer, when I’m building a WordPress theme my strong preference is to build on the Genesis Framework. I’ve written about Why the Genesis Framework is Great. Pre-Made Genesis Child Themes The Genesis Framework is a parent theme that needs a child theme to go with it (Genesis does the heavy lifting and […]
Test Credit Cards
The following is a reference I’ve created for myself for test credit card numbers when dealing with different payment Gateways. Note: These test numbers only work when the transactions are submitted in Stripe’s testmode (or to the sandbox for Authorize.net). More information on: Authorize.net sandbox Stripe Test Mode Authorize.net Test Card Brand Number American Express […]
WordPress Development Editor
Recently, the question came up about a good editor for WordPress development. The Editor You Know is the Best Editor WordPress development does not require any specific editor. If you already have an editor you know and like, I suggest sticking with it. If your editor is extensible through plugins or configuration, I would look […]
.gitignore for WordPress
Originally when I started using Git with my WordPress projects, I checked in all the files (WordPress core, plugins, themes, and even uploads). Over time I’ve found that to be less than ideal. My preferred .gitignore file appears below and it ignores everything by default. This allows me to whitelist only those plugins and themes […]
Why Capitalize the P in WordPress?
In the WordPress community, I’ve found there is an over-emphasis on capitalizing the P in WordPress, to the point where there is a function in WordPress to correct the lower-case p (see capital_P_dangit() ). While all this fuss over the size of “P” may seem pedantic and silly to you, it is still worth taking […]
Responsive Images with srcset
When loading an image, historically I loaded the largest size of the image that would be used. e.g. example.jpg is an 1170px wide image for large screens. On small screens this big image is loaded but scaled down to display properly. The important thing to note here is even if the image is only displaying […]
QR Code Best Practices
As a web developer, this article is going to focus on the use of a QR code (Quick Response Code) to point to a website URL. The first step in properly implementing your QR code, which points to a website URL, is to ask yourself, “Does this need a QR code?” Hint: the answer is […]