When working with WP CLI, I often have data to output and instead of looking up how to do it each time, I wanted to make myself some notes.
A quick table of the differences in 301, 302, 303, and 307 Redirects.
By default Vim is the editor used when writing a Git commit message. While I love Vim, it does work very differently than most other editors. A good option for those who are not comfortable with Vim, is to use a different editor. This is how to setup Git to use a different editor.
When using Git, sometimes (often) I find myself forgetting to delete local branches after merging them. This command deletes this branches (and I’ve included a Git alias to make it easy to use in the future).
I setup a site for WordPress Core development with Local by Flywheel and documented the steps. If you’re trying to do the same, this might be helpful.
On a WordPress project, I wanted to display the full post on the blog archive unless a manual excerpt had been created for the post (in which case I wanted to use the manual excerpt). Here is the code I used to make this happen.
On a recent project, I had to trigger a certain behavior when a native HTML5 video had completed playing (i.e. reached the end of the video, manually stopping it should not trigger the behavior).