Code Archives

  1. SASS Variables for Selectors

    I’ve been getting friendly with SASS as Crowd Favorite has standardized on that for our CSS pre-processing. Today I was excited to learn1 I can use variables for selectors (and for property names, etc.) as well as for property values (the common usage). View the code on Gist. I’m going to really like this for…

  2. My Content-Powered Projects Page

    projects-page-crop

    As alluded to earlier, I’ve cleaned up my projects page which is now powered by a new taxonomy, custom post type and the content I’ve generated here over the last decade plus. Turns out, I’ve generated quite a few projects. I’m not completely done creating and managing the content, but I’m pretty happy with the…

  3. The Right Way to Include a Plugin in a WordPress Theme

    In our FavePersonal theme we integrated the excellent Social plugin from MailChimp and included an option to turn it on or off. Most importantly we did it in a way that still allows the Social plugin to be installed and updated independently. We made sure that we implemented this in a manner that: respected users’…

  4. Add a Preview Button to the Fullscreen Editor in WordPress

    fullscreen-preview-button

    I really like the fullscreen editor in WordPress. I use it nearly all of the time when composing long-form content, often in conjunction with the excellent Markdown on Save plugin by Mark Jaquith. It has always bugged me that there wasn’t a Preview button in the fullscreen mode toolbar. Problem solved. Here’s the code. View…

  5. Anonomize Non-Public WordPress User Data

    If you need to remove non-public user data from a WordPress database, these SQL queries should do the trick for you: View the code on Gist. Note that if you have plugins, etc. that store additional user data in user meta you might need to clear those out as well.