When your website means business.

Snippets

A collection of (mostly) WordPress-related snippets and references I’ve found useful and worth keeping where I can find them. Feel free to use what you like, and point me to some better snippets or references.

Accessible Hiding of Elements with CSS»

Developers commonly use display: none to hide content on the page. Unfortunately, this simple and common action can be problematic for users of screen readers. Below is a better way:…
Accessibility, CSS | Type: CSS

ACF Images: ID»

By using the ID, you can retrieve any crop size of the image and even get the name of the file!
ACF | Type: PHP

ACF Images: Image Array»

Select'Image Object' option to access an array of image attributes. Useful for thumbnail support.
ACF | Type: PHP

ACF Pro Site Options»

For some reason, this HAS to be added to functions.php; MU plugin does not work.
ACF | Type: PHP

ACF Repeater Gallery (Image Array)»

This example shows a full page width, with 4 gallery images across. The 'rel="lightbox"' bit triggers the modal window for the lightbox plugin.
ACF, Gallery | Type: PHP