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.
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
WP Mail SMTP plugin settings
The following settings use Gmail as an example, but they apply for webhost SMTP server as well. From Email: your full Gmail address From Name: name [...]
Gmail MX | Type: Other
Yet Another Self-clearing Float
Have not tried this one.
CSS | Type: CSS






