A collection of (mostly) WordPress/ClassicPress-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 other snippets or references.
Add Theme Support for Title Tag
It used to be that the way to add the Title Tag to WP sites was to add this in the theme’s header.php: <title><?php wp_title(); ?></title> [...]
Template Tags, WP/CP | Type: PHP
Adding a Label to the Main Editor for Custom Post Types
When a CPT relies on a lot of custom fields via ACF, the unlabeled main editor can be confusing (“What’s this for?”). This code goes in [...]
ACF, CPT, Custom Admin, PHP | Type: PHP
Adding an edit tag in PHP conditional
Add [EDIT] in a PHP conditional, with style tags surrounding
PHP, WP/CP | Type: PHP
Adjust widget tag cloud font size range
Sometimes the tag cloud sizes are too extreme. This fixes that.
WP/CP | Type: PHP
Animate as Item Enters Viewport
Nice piece of work from Chris Coyier.
Animation, CSS3, Javascript, jQuery | Type: Javascript
Animate on Scroll Library (AOS)
Animates block items as you scroll and they enter the viewport.
Animation, CSS3, Javascript | Type: Javascript
Audio Embed
See result on nmctr.org
Media | Type: Other
B&W Image to Color on Hover
Cool little bit of CSS magic. img.saturation { filter: saturate(0); } /*turns color image into B&W*/ img.saturation:hover { filter: saturate(1); } /*restores color*/
CSS | Type: CSS
Basic WP-query
As basic as it gets, for clarity's sake.
WP Query | Type: PHP
Category Filters for Custom Post Type
Read the entire thread.
Filter | Type: PHP






