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.
Animate as Item Enters Viewport»
Nice piece of work from Chris Coyier.
Animation, CSS3, Javascript, jQuery | Type: Javascript
Animate on Scroll»
Animates block items as you scroll and they enter the viewport.
Animation, CSS3, Javascript | Type: Javascript
Anonymize IP in Google Analytics»
Set anonymizer after UA code: <!-- Google Analytics --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXX-Y', 'auto'); ga('set', 'anonymizeIp', true); ga('send', 'pageview'); </script> <!-- End Google Analytics -->
Security, Sharing, WP/CP | Type: Javascript
Audio Embed»
See result on nmctr.org
Media | Type: Other
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
Change background and color of Chrome autofill»
.top .search-form input:-webkit-autofill, .top .search-form input:-webkit-autofill:hover, .top .search-form input:-webkit-autofill:focus, .top .search-form input:-webkit-autofill:active { -webkit-box-shadow: 0 0 0 100px #222 inset !important; -webkit-text-fill-color:#fff!important; }
CSS, Forms | Type: CSS
Change WordPress Sender Email»
Less system-generated email will end up in spam folders if it's a legitimate email address.
WP/CP | Type: PHP
Child Theme Style Header»
Header info for child theme style sheet.
Child Theme, CSS, WP/CP | Type: CSS
Clear Clipboard»
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