Git stash

I use Git when working on my WordPress projects.

On occasion, when I’m working on the latest branch and testing out some changes, styling, code etc, I’m *really* excited that I’ve squashed that bug / made that visual improvement.
However, it’s only then that I realize I didn’t create a new branch for my current round of changes.

So, it’s copy/paste, multiple CTRL-Z’s and then paste in. But wait! The changes are in multiple files. Darn.

Have no fear. Git can help.

At the command line:

git stash
git stash branch new-fix-feature-branch-name-you-should-have-created-in-the-first-place

Git stashes the original changes, then creates and checks out the new branch name I provide and places me in the new branch *and* applies the changes.

The changes that were stashed and then applied to the new branch are also removed from the “stash pile” by design and upon successful application.

And Voila! Sanity replaces profanity.

WordPress plugin – Featured Image Admin Thumb

I am happy to share my latest WordPress plugin. Inspired by a recent site I was working on, this plugin helps identify the featured image that is associated with each Post or  Page. Find out more about the plugin and try it out for … [Continue reading]

WordPress Backups

Backups. Everybody talks about them and says they are doing them, or going to do them or definitely going to do them. However, sometimes the truth is no backup is in place. I wanted to raise awareness and encourage backups for WordPress site owners … [Continue reading]

Add a bit of style to the WordPress categories widget


By default the WordPress categories widget offers quick and easy links to your content categories. With a little bit of CSS you can easily make some stylish additions to the output. So, here's the before shot: But in this case I want to add … [Continue reading]

WordPress issue – ‘blog pages show at most’ not working

While working on a client project I thought it would be best to use real content from the clients site to check, amongst other things, if pagination was working on the home page. After importing the clients data into my development site I … [Continue reading]

Post comments not allowed if comment metabox removed

Allow Comments in edit post

When building a site for clients it's nice to clean out the Admin Dashboard screen of some of the unnecessary (and possibly dangerous) sections and checkboxes to avoid distractions when creating or editing their content. WordPress is flexible enough … [Continue reading]

Slow WordPress tag queries

WordPress Logo

While working on a real estate project I encountered very slow response from WordPress on certain queries. These queries are multiple tag queries in the form: My application is using WordPress tags to … [Continue reading]

Importing data into WordPress

WordPress Import Real Estate Listings

I've been working on a project that requires me to reference an external database of property listings - 106,000 of them - and display these listings in WordPress. One way I thought of was to create a plugin to read the listing data into … [Continue reading]

Adding Child Theme filters and Twenty Ten

Working on a child theme project for a client I found that my filter modifications for both 'excerpt_length' and 'excerpt_more" were not being processed. My child theme is based on Twenty Ten and the filters I was using had already been filtered by … [Continue reading]

WordPress 3.0 and flush_rewrite_rules

I thought I would document this experience I had when upgrading some sites to WordPress 3.0. After WordPress 3.0 came out I took some time to upgrade blogs I manage and was impressed how well the upgrades fared. No issues, fair warnings and … [Continue reading]