When I’m ordering food (e.g. french fries), I often find myself doing the math. For 30% more money, I can double the amount of fries I get (i.e. 100% more fries). Clearly, this significantly reduces my cost per fry, which results in me buying the larger fry. However the problem is the cost per fry […]
When it comes to adding social sharing buttons (e.g. “Share on Facebook”), I’m a big fan of Scriptless Social Sharing by Robin Cornett. The one thing I like to do when using it is add UTM parameters to the links that are shared. Here is the snippet I use to add UTM parameters to my URLs that are being shared.
At some point when pushing your code to a remote server (e.g. GitHub, Bitbucket, GitLab) you’re going to see an error that says, “failed to push some refs” and “Updates were rejected because the tip of your current branch is behind its remote counterpart”. This occurs when someone else pushes code to the remote server that you don’t have. Don’t panic, we can fix this.
With the impending new WordPress block based editing experience, Gutenberg, many are preparing for the initial merge by installing the Classic Editor plugin. My understanding was that this plugin will initially suspend the new editor on their site, however this is not entirely true. Classic Editor Settings Once installed the Classic Editor plugin adds one […]
With WordPress 5.0 a new block-based editing experience will be introduced (a.k.a. Gutenberg). This new editing experience is available via the Gutenberg plugin. By adding this plugin to your (development) WordPress website, you can preview the new editing experience. At the time of this writing, Gutenberg is still under-development so I recommend only installing it […]
Recently, I was commenting to my wife that I find myself often going to my Draft posts for notes I’ve taken on completing some task. I complained that these posts were not ready to be published as they had not met my high standard of quality (i.e. I hadn’t removed the most obvious typos and […]
I’ve become a big fan of Local by Flywheel for local WordPress development (i.e. running websites on my Mac). One thing I do find frustrating is the need to SSH into my Local by Flywheel website when I want to run a WP CLI command. Thanks to some great work by Morgan Estes with his […]
There is a very useful command line tool called which. This tool determines which file will be executed when you type it. Unfortunately, this command can sometimes provide the wrong answer. Background The PATH environmental variable is a list of directories to check for an executable when it is entered. This means that an executable […]
This tweet blew my mind. $ git log | vim -R –Now press <K> on a commit hash. — Luke Diamand (@LukeDiamand) February 21, 2018 I spend a lot of my time in Vim and Git and this is an amazing combination of the two. While I love this command, I think we can do […]
At a recent WordPress meetup we were discussing WP CLI and the comment came up, “When setting up a site, it would be nice to install a bunch of plugins with a single command.” Fortunately a WordPress meetup is a great place to bounce ideas off of smart people and find a solution. Solution 1: […]