A React + Redux WordPress Theme — Version 2.0

It’s that time of year again. I’ve updated this theme, which runs off my open theme + a few minor style tweaks. What’s new in v2.0? It’s all completely under the hood. So you’ll see nothing different here… But I’ll know. First, since I build the theme, react-router hit version 4 and changed everything. There are a whole lot of changes in this theme due to that. One huge benefit to this update is that now it is much easier to integrate state into your redux flow.

Continue reading...

How to set up a local WordPress Vagrant development environment

Setting up a Vagrant box can be painstaking. Here is the process: Install a basic box. SSH into said box. Run a command. If it works, add the command to a provision file. Destroy your box. Run the box again and see if the command works via a provisioning file too. Whether it works, or doesn’t work, back to step 2 and try a new command or try the same command another way – depending of if it worked or not.

Continue reading...

Plugin Concept: Request Post Feedback (with revisions)

I was listening to the Post Status Draft podcast from about a year ago where Brian, the founder of Post Status, interviews Matt Mullenweg. In their discussion they Brian mentioned the Drafts with Friends plugin and how he’d like to see something like Google Docs collaboration, editing. That got me thinking about what the MVP, minimum viable product, for that would look like… and I came up with the Request Post Feedback plugin.

Continue reading...

Developing A Theme for WordPress Using ReactJS, Redux, and the WP REST API

To being, check out the project here. This is a work in progress, but I got enough done this weekend that I’d like to share. I wanted to work on a project using ReactJS and Redux. I’ve heard a lot about it, and wanted to explore it on my own. I do that with every technology before I bring it to the office. Since WordPress incorporated the WP REST API in the core for version 4.

Continue reading...

Refactoring a WordPress plugin, Object-oriented, a start

I recently dissected an Object Oriented WordPress plugin boilerplate. This exploration was part of a project I am undertaking to explore best practices for implementing Object Oriented principles in WordPress development. When it comes to implementing coding principles, I’m generally not a purist — I aim to be utilitarian. One of the dictums I drum into my team is: “Make it work, then make it work well.” Do not take that to mean I’m sloppy, the second half of that statement holds as much weight as the first.

Continue reading...

How to Globally Ignore files from git

TLDR; nano ~/.gitignore git config –global core.excludesfile ‘~/.gitignore’ Background Git is all the rage, why wouldn’t it be? You can save every iteration of your work; it’s the persistent undo button for developers. Seriously, if you’re not using it, start now. Find a tutorial, stop everything you’re doing and get on that. It will make your work 1000% more efficient. One issue I came across with my workflow is that my Mac, like everyone else’s, places a .

Continue reading...

Why doesn’t flush_rewrite_rules() work on my plugin?

One common issue that people run into when using custom post types in their plugin is that the pretty permalink structure doesn’t seem to take hold on plugin activation. When adding new paths into the permalink structure, like with a new custom post type, you typically need to run flush_rewrite_rules() in order for them to take hold. One common piece of advice people give is to visit the Permalinks page in the Settings menu in wp-admin.

Continue reading...

Object Oriented WordPress Plugin Development

I’m refactoring my WordPress plugins to implement better Object Oriented Programming concepts in them. During my exploration I came across wppb.io. I have the utmost respect for the initiative and contributors to the project. I see this post as an exercise in understanding other people’s code, and thinking about what I would do. So I’m going to do my best to rip the project part. I may be way off on some things, and spot on with others.

Continue reading...

SUPER Simple React webpack Tutorial, so you can start ‘Getting Started’

Update: This was written before create react app came out. Use that, it’s awesome. The overly complex tutorials for webpack pissed me off for the last time. Just clone this. https://t.co/H7ozaDlvwN — {{{Jack Reichert}}} (@JackReichert) March 12, 2016 I was annoyed by how many people are trying to sound smart in their tutorials, and thus not really helping anything. I wanted a simple “Here is what you need to get started” tutorial and lost a day chasing rabbits down broken holes.

Continue reading...

How to Back up Your Database on Vagrant Halt

I’ve been exploring Vagrant lately. At work we need a better development workflow, and at home I’ve been reaping the benefits as well. One of the nice aspects of Vagrant is the ephemeral nature it gives to your environment. You can spin up a development box quickly and easily with a single command vagrant up when you’re not working you can halt the virtual machine with vagrant halt and when you’re not working on the project you can destroy the virtual machine and clear up your resources with vagrant destroy.

Continue reading...