A collection of (mostly) WordPress/ClassicPress-related snippets and references I’ve found useful and worth keeping where I can find them.
NOTE: Some of these snippets are old and may be outdated. Feel free to use what you like, and point me to better snippets or references.
Unset Intermediate Thumbnails
Sometimes you don't need intermediate sizes. Snippet shows you how to lose them.
Media | Type: PHP
Unsplash Placeholder Images
Various ways of displaying Unsplash images (using Unsplash as CDN)
Images | Type: PHP
Upload folders for Custom Post Types
Create a folder within wp-content/uploads that will contain uploads for each custom post type.
CPT, PHP, WP/CP | Type: PHP
Vertical Align
Vertical align anything with just 3 lines of CSS, do not need to know height of object or container.
CSS3 | Type: CSS
Video Backgrounds
Full page video backgrounds.
Video | Type: Other
Visually hidden, still available for screen readers
This is useful for hiding labels while relying on placeholder text for sighted visitors. The alternative (display:none;) hides items from screen readers. clip-path: inset(100%); clip: rect(1px [...]
CSS | Type: CSS
WordPress Enqueueing Guide
About enqueueing styles and scripts in WordPress.
WP/CP | Type: PHP
WordPress Meta Query (Basic Example)
Meta Queries compare multiple keys and values.
WP Query, WP/CP | Type: PHP
WordPress Template Tags
Sometimes you need to turn a WP template tag into a PHP variable, so you can construct a proper bit of code.
PHP, WP/CP | Type: PHP
WP eCommerce Tricks
Check SOC Racing for WP eCommerce implementation.
eCommerce | Type: Other






