How to Create an Alphabetical Index of Posts in WordPress

About a year ago, I was handed a design comp from a designer that required me to build out an alphabetical index for a custom post type in WordPress. You know, something like this:

WP Alpha Index

…where clicking on one of those letters would take you to a page showing only posts with titles starting with that letter. I managed to cobble together a solution that works pretty well. Not great, but passable. It involved writing quite a few custom functions – one to generate that bunch of links you see in that image above, one to register a query parameter so I could use it in WordPress, and then a few more functions to do the right queries in the database, a bunch of code in the template to make sure I was showing the right posts…and on and on. Continue reading

Should everyone learn to code?

You keep using that word…

We hear about this a lot. Learning to ‘code’. But what are we talking about when we’re talking about coding?

Because that’s not just one thing. There are any number of different languages you could learn – HTML, JavaScript, Python, Java, Objective C, Basic, PHP and on and on and on. At some level, all of those could be considered ‘coding’.

When I say coding, I’m talking about anything you can use to make something with a computer, whether that’s a website, an iPhone app, a game, or a piece of software.

When I say I think everyone should learn to code, I mean that I think everyone should have the skills to make at least one simple, basic thing using a computer. Continue reading

Radical Inclusion

At WordCamp Las Vegas 2011, I gave my first ever WordCamp talk. My topic was Progressively Enhancing Your WordPress Theme.

I chose that as my topic because I believed then, as I believe now, that progressive enhancement is nearly always the best way to build a website or web application. Focus on getting the content to someone, no matter what device they might be using, or what capabilities they might have. Then work on adding extras to that experience for devices and for people who have the capability to enjoy them.

As the web’s reach expands, the ways that people access it change, too. We take for granted that everyone else is having the same experience on our websites that we are – sitting at a desk with a nice, big monitor or maybe even balancing a laptop while sipping a coffee. But people access websites on gaming consoles, ebook readers, phones (only about half of which are smartphones),  tablets, televisions, etc. And all those different devices have different capabilities. Continue reading

The ‘Best’ WordPress theme is…

In case you didn’t know, I’m a regular over on the WordPress forums on LinkedIn. I like helping people out with their WordPress puzzles and conundrums.

Without a doubt, the most popular question people ask is some variation on “What’s the best WordPress theme?” For example, looking through page one of the forums today, I see:

Any insight into the best themes for mobile responsive?

What’s the best free or premium theme with featured page blocks on the home page?

What are the best free customizable themes available?

Which framework do you guys suggest for making responsive child themes?

These questions are tough, if not impossible, to answer. Not because there aren’t any great themes, but because the premise is all wrong. Here are the bad assumptions I see people making over and over again: Continue reading

Once-a-day email

I only check my email once a day. On weekdays. I don’t read emails on weekends. I don’t have push notifications for new emails set up on my phone.

I start my workday by opening up my inbox. I work through everything in there. If it will take less than a few minutes, I do it right away. If it takes longer, I put it on my to do list. Then I close my email until the next morning.

The benefits are tremendous. I can focus on the task at hand. I’m not constantly wasting mental energy every time my inbox pings. I’m way more productive, more focused, and just plain happier.

Most frequently, when I tell people that this is how I run my business, I’m met with wide-eyed stares and proclamations of “I could never get away with that.”

But you could. Really. If you wanted to. Continue reading

I know I can, no matter what you say

I was half-way through 8th grade. At the half-year point, we switched teachers and classrooms. Report cards had just been handed out and I had arrived a bit early in my new science teacher’s classroom. My report card rested on top of the stack of books on my desk.

My new science teacher helped himself to my report card. He peered at me over the top of it and said, “All A’s, huh?”

I smiled at him and said, “Yes. Always.”

And he scowled at me and said, “Well, don’t expect to earn an A in my class. Girls don’t get A’s in my class.

We stared each other down for a few beats, he put my report card back, and walked back to the front of the room. I don’t think he ever spoke directly to me the rest of that semester, but I did, in fact, earn an A in his class. And in just about every other class I took in high school. Continue reading

I Act Too Much Like a Woman

I was catching up on an episode of The F Word with Gordon Ramsay. Chef Ramsay was on a tear to show people how fast they could cook up healthy, fresh food. He found a group of nurses who ate microwaved convenience meals for dinner every night because thought that’s all they had time for. He saw the sorry state of affairs and said to them, “You’re acting too much like women. You’re taking care of everybody else, but you’re not taking care of yourselves.”


And yet, I am so very good at taking care of everybody else and so very bad at taking care of myself. Continue reading

Place text over images on hover without JavaScript

Thanks to CSS3 and better and better browser support for it, we can accomplish things now with CSS that previously required fancy JavaScript work. In this tutorial, I’ll walk you through fading in text over an image on hover. Continue reading

“Here I Am” Moments

One of my favorite radio personalities, Jad Abumrad, co-host of Radiolab, gave a keynote address at the Third Coast International Audio Festival titled These Are a Few of My Favorite Things, where he talked about his experiences working in radio and the things he loved most about it.

It was from listening to this talk that I learned about what I’ll call the “Here I am” moment – the moment where a reporter steps out from behind the story they’re telling to say, “Here I am. This is me. This is who I am.” These moments aren’t long, just a few seconds once or twice in a story. But they let listeners know exactly who is behind the story. Continue reading

Using Google Analytics with WordPress

Chances are, if you’ve set up a website with WordPress, it would be really nice to know how many visits you’re getting, where those people are coming from, which posts are the most popular, etc. Google Analytics is a great tool for that job. But how do you use Google Analytics with WordPress?

There are tons of places you can go to learn how to set up a Google Analytics account, so I won’t go into that here. But basically how Google Analytics works is you set up your account, tell it what website you’d like to track, and then Google gives you a bit of code, called a code snippet, that needs to be added to your site to enable Google to track what’s happening on your site and provide you with reports. Continue reading