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.
Use these card numbers to test Stripe before going live.
eCommerce, Forms | Type: Other
How to style a Google calendar in an iframe embedded on a page.
CSS, PHP | Type: CSS
Put 'add-to-any' share buttons anywhere on the template.
Sharing, Template Tags | Type: PHP
Works very smoothly.
Use mostly on FAQ; does not change toggle text.
Once you've established a date, display it as you like (see catholic fdn single-events.php for complex usage)
ACF, PHP, WP/CP | Type: PHP
An excellent resource for WP developers; includes examples.
¡Important!, WP/CP | Type: PHP
Sometimes you don't need intermediate sizes. Snippet shows you how to lose them.
Media | Type: PHP
Various ways of displaying Unsplash images (using Unsplash as CDN)
Images | Type: PHP
Create a folder within wp-content/uploads that will contain uploads for each custom post type.
CPT, PHP, WP/CP | Type: PHP