snippets

Notes from the shop — process, tools, and the occasional opinion.
April 8, 2020

Smooth Scroll Offset Anchor Links with CSS

Don't you hate it when you create an anchor link and it gets covered up by a fixed header? And isn't it a bummer…
October 7, 2016

Get the Featured Image of a Parent Page in WordPress

When you're building a number of pages in WordPress that are closely tied to a main, or parent page, tying them together with imagery…
June 1, 2016

Get the Title of the Parent Page; If No Parent, Show this Page’s Title

This snippet is from a book project - the book title needed to be shown on all subsequent chapters, unless it was the main…
April 15, 2015

Save notes to Evernote from Sublime Text

For a few years now I've used Snippets for keeping track of code snippets. It's been a fine app, but recently has become slow,…
August 4, 2014

Remove previously tracked file from git repository

Here's a simple git command that will remove a previously tracked file from a git repository: git rm --cached <file> The file will be…
July 28, 2014

Modify theme layout in Hybrid Core

Here's how to modify the Theme Layouts extension in Hybrid Core: in functions.php: You can then hide sidebars and such like so: in a…
March 17, 2014

Hide title attribute on hover, but don’t remove

A client of ours uses PrettyPhoto to show galleries of artwork and they recently requested that we change up the way in which the…
March 7, 2014

@font-face not rendering in Chrome

Since launching the latest version of Spigot last week there has been an intermittent issue with our @font-face fonts not rendering (We serve web…
October 24, 2013

Search and replace multiple files in Sublime Text

Command - Shift - F This is mainly a link for personal reference. I can't seem to remember it. Source: http://docs.sublimetext.info/en/latest/search_and_replace/search_and_replace_files.html