Published on CSS-Tricks!

Much thanks to Chris Coyier for accepting me as a guest author on css-tricks today!

I wrote a brief article about altering the CSS classes that WordPress generates by default, giving them a more SMACCS-friendly naming scheme.

SMACCS-Press!

WordPress Function to Create a Breadcrumb Navigation Menu

The first time I started using breadcrumbs was as a part of the Yoast SEO plugin. While that’s a very well-written and successful plugin, I do think it oversteps its bounds in many ways, and I prefer not to install it for several reasons. The main one is that it adds so much functionality to wp-admin that it ends up confusing admin users. It also gives them the ability to jam keywords that may be doing them more harm than good.

But I do appreciate the breadcrumbs, and they’re really tricky to create! To that end, I came up with my own template tag for breadcrumbs, and it responds to a variety of views, to include single, search, custom post types, and 404. It also “crumbs down” into child posts or child terms of the current view.

Here’s the gist.

As a word of warning, this function contains references to other functions from my theme that you probably won’t have running, so, as always, read it and understand it before you use it. That said, here are the helper functions referenced in the main breadcrumbs function:

https://gist.github.com/scofennell/f8f52b89a004c58ef4b2

WordPress Plugin to Log JS Errors in a Page

At my day job, we’re looking at a way to migrate a large number of sites from an outdated WordPress install to a current one. I believe that our biggest problem with be the differing versions of jQuery. To that end, I created this plugin, to log JavaScript errors to a page.

more… WordPress Plugin to Log JS Errors in a Page

WordPress JSON Rest API Shortcode & Tutorial

They say you’re supposed to write with one specific person in mind, instead of writing for everyone. In this case, I’m writing for, well, me. Specifically, me before I spent about 4 hours hello-worlding the new WordPress JSON Rest API yesterday. I found the existing documentation to be a little too advanced, or vague, for my humble skill set. To that end, I’ve written a shortcode to bundle up what I learned and to help you hello-world it yourself:

more… WordPress JSON Rest API Shortcode & Tutorial

Making a “Skip To Content” Link in WordPress

A “skip to content” link is a link, typically hidden from view, usually at the very top of the page source, to navigate directly to the main content of the page. There’s one on this very blog! You can see it if you view source, and you can also see it if you tab to it, as per wp.org accessibility guidelines. There are a few different components that make this happen, which I’ll explain in this post.

more… Making a “Skip To Content” Link in WordPress