Underscores Theme Multiple Menus

If you’re using the Underscores theme (also knows as _s) by Automattic, you may have tried to add multiple menus to the page and been frustrated when they don’t work on mobile.

Here’s a bit of Javascript to add to the theme’s navigation.js file to fix the issue:

https://gist.github.com/macbookandrew/74fd6dd1d101debcf6890778052609d4

Infusionsoft to Shopify Customer History Migration

A helper utility to copy Infusionsoft contacts and their order history to Shopify, ignoring Infusionsoft contacts who do not have orders associated with their contact ID.

It also optionally pulls info from a WooCommerce installation.

Get the code from the GitHub repository. Continue reading “Infusionsoft to Shopify Customer History Migration”

Listing Unique Font Stacks on a Webpage

I just put together a new tool to list all the unique font stacks on a web page, intended to help with diagnose and remove unnecessary webfonts and save page load time.

Usage

Download this file and include in your page source, or copy-and-paste it into your browser’s JS console, then run the styleInPage() function with the CSS style you want to inspect as the parameter.

Examples

// Show all unique font stacks in use on the current page
console.log(styleInPage('fontFamily'));
// Show a list of all DOM elements with their computed font stack
console.log(styleInPage('fontFamily', true));
// Highlight all DOM elements using font stack 8
var fontStacksInUse = styleInPage('fontFamily');
console.log(fontStacksInUse);
highlightInPage(8);