A WordPress filter to avoid widows in your titles

When you’re a designer who codes (or a developer who designs), you end up obsessing over stupid things like making sure you don’t end up with widows in your titles (a single word that wraps to a new line).

Here’s a small filter you can throw in your functions.php file to replace the last space in your titles with a   character.

Coach Welker

I would guess that almost everyone has a favorite teacher—an individual who impacted their life in a profound way. I’ve been fortunate to have several such teachers, but today my thoughts are on one in particular.

Jeff Welker was a high school history teacher and football coach. A man deeply dedicated to his profession and to the students for which he practiced his craft. He was passionate about American history and it showed in the way he was able to bring to life the lessons of the past.

His classroom was decorated with military paraphernalia, including an old artillery shell that he would drop on the desk of any unsuspecting student who made the mistake of falling asleep during one of his lectures. A rude awakening perhaps, but a powerful lesson about the importance of remaining present, mentally, in order to learn about the world around you.

That lesson about remaining present made a lasting impression on me as a 16 year old. Coach Welker didn’t just feed us historical facts from a textbook and expect us to memorize the names and dates contained within. Instead, he taught us to hold all the answers at arms length, to be present enough to examine each bit of information critically instead of accepting each as an infallible truth.

In short, he gave me the power to ask tough questions. And this power shook my mind with the impact of that old artillery shell, waking me from the slumber of adolescence to begin seeing the world through my own eyes.

Jeff Welker passed away yesterday in his home. Taken from this world earlier than anyone would have hoped. Even so, the impact that he had on the lives of countless students like myself continues to resonate as a living testimony to the gift his life was to his students. I am grateful to have been a recipient of that gift.

Reflections on 2014

I’ve never been much for resolutions, per se, but I do think it can a good idea to reflect on the year that just passed before barreling headlong into a new one. In that spirit, I thought I would jot down a few professional milestones from the previous year.

Public speaking

One of my goals for the year was to try my hand at public speaking outside of the office. Fortunately, I had a couple of great opportunities. The first was WordCamp St. Louis where I spoke about responsive images (video | slides). The second was HighEdWeb Pittsburgh where I talked about some of the stuff I had been learning about designing mobile friendly web forms (slides).

In doing so, I was again reminded that one of the things I love most about the web industry is that it exists because people simply share what they know with the community. This year I hope to do even more sharing, even when—perhaps particularly when—I don’t feel like I have anything to share that would be of any value to others. I also met some great people who inspire me to be better at my craft and from whom I continually learn new things. Special thanks to Dave Olsen and Aaron Graham for giving me the opportunities at both events.

Learning new skills

My job title says “designer” but I’ve always been a design/development fence-sitter, because I like to be able to execute the ideas that I have in my head and not just make pretty photoshop comps describing what it is I want to see made.

This year, I decided I needed to bone up on my JavaScript skills a bit and found the JavaScript course at Codecademy to be a fun way to get back to the fundamentals and fill in some of the gaps in my knowledge from being a self taught hack. I can honestly say going through that course made me a better all-around programmer, not just when writing JavaScript, but also with the PHP that I was writing for WordPress projects.

Launching new projects

Working at a University comes with the chance to work on some really interesting projects. One such project came this year in the form of an ambitious proposal to launch a new online publication that would showcase original essays and reviews focused on the big ideas of our time.

Screenshot of the Common Reader homepage

After a lot of hard work with a great team of people, The Common Reader was launched in October. I was the primary designer and did quite a bit of development on the site, which was a lot of fun. I look forward to watching the publication blossom and grow in the coming years.

Contributing to WordPress core

I’ve used WordPress longer than Facebook has been a company, but had never even thought about contributing any code to core until earlier this year when I ran across a bug on a project at work and decided to learn how to submit a patch. Once I saw, ‘props joemcgill,’ show up in the Trac logs, I was hooked. I ended up working on several patches, some of which made it into the WordPress 4.1 release in December—a particularly fun accomplishment that would not have been possible without the support of the generous community that is behind WordPress development. I look forward to getting more involved in the WordPress community in the coming year.

A local WordPress setup using VVV

Varying Vagrant Vagrants (VVV) is an open source project based on Vagrant which helps you set up a local development environment preconfigured with everything you need to start doing WordPress development on a modern LEMP stack that mimics the configuration of several popular hosting environments.

Follow the setup instructions on the project’s Github page to get everything setup, which includes installations of the latest stable and bleeding edge versions of WordPress, and a development setup for working on WordPress core. After you’ve completed the installation process you can administer your environment through the command line, or if you’re on a Mac, use Vagrant Manager to control VVV directly from the menu bar.

An updated dashboard

VVV comes with a very basic dashboard to get started, which can be found by pointing your browser to http://vvv.dev. The default dashboard gives you quick access to the essentials, but not much more.

For a better dashboard experience, including easy access to any of additional sites you may have set up, I recommend using VVV-Dashboard by Jeff Behnke.

VVV dashboard, v0.1.3.
VVV dashboard, v0.1.3.

Install it by cloning the repository into your vvv/www/ directory and copying dashboard-custom.php and style.css into your vvv/www/default/ directory.

Setting up additional sites on VVV

One of the great features of VVV is the auto site setup which can be used to create a new development site by modifying a couple of config files. Simon Wheatley has a nice example. I also recently ran across Alison Barrett’s terrific vvv-site-wizard, which automates the whole process of setting up new sites from the command line and even allows you to mirror the media directory of a live site, which comes in really handy.

By using VVV to get a local development environment in place, you can stop worrying about complicated server administration tasks and focus your attention on that next great WordPress project you’ve been thinking about.