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.
Read the entire thread.
Filter | Type: PHP
Less system-generated email will end up in spam folders if it's a legitimate email address.
WP/CP | Type: PHP
Header info for child theme style sheet.
Child Theme, CSS, WP/CP | Type: CSS
There are glitches with Dreamweaver and possibly with OSX that prevent copying text occasionally. So far the only thing I’ve found that works is to clear the clipboard via Terminal…
clipboard, pasteboard | Type: Other
Not sure why you wouldn't use a placeholder instead.
Maybe the most widely used clear after float.
CSS | Type: CSS
Enable compression in wp-config /* Compression */ define( 'COMPRESS_CSS', true ); define( 'COMPRESS_SCRIPTS', true ); define( 'ENFORCE_GZIP', true );
wp-config | Type: PHP
Conditional based on values for single-value fields (radio buttons, select, etc).
ACF, PHP | Type: PHP
Reverse query from different post types associated via ACF relationship field.
ACF, CPT, WP Query | Type: PHP
This has to do with creating hierarchical CPTs, so you can have ‘sub-posts’ as children of a CPT single.
CPT, WP/CP | Type: PHP