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.
Horizontal Nav Pipe
Add 'pipe' between horizontal nav items, except last item.
CSS | Type: PHP
How to Initialize jQuery Scripts
tops the javascript error that doesn't recognize '$' as a valid function.
Javascript, jQuery | Type: Javascript
HTML5 Toggle Search
First, add HTML5 support to functions.php
CSS3, Search, WP/CP | Type: CSS
Incorporating Dashicons into Content and Templates
Two approaches for adding dashicons in HTML, using WordPress native CSS. <h2 class="dashicons-before dashicons-smiley">A Cheerful Headline</h2> <h2><span class="dashicons dashicons-smiley"></span> A Cheerful Headline</h2> Both would appear like [...]
WP/CP | Type: PHP
jQuery Better Show-Hide
A show-hide that still works(?not tested lately); changes toggle content.
Javascript, jQuery | Type: Javascript
Kill Extra Markup on GF
When form displays "extra markup": empty p tags, etc
Forms | Type: PHP
Linear Gradients
Add gradients without the use of background images.
CSS3 | Type: CSS
Loading acf/init properly
This code wraps ‘acf_add_options_page’ code (usually in the theme functions file): add_action('acf/init', 'my_acf_init'); function my_acf_init() { // Get ACF version. $version = acf_get_setting('version'); // add options [...]
ACF | Type: PHP
Mac or PC? Add Body Class
This can be useful for IE issues.
Javascript | Type: PHP
Minimum Amount for Gravity Forms Total
Nice little code snippet from tkulow. Goes in theme's functions.php
Forms | Type: PHP






