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.
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. A Cheerful Headline <h2 class="dashicons-before dashicons-smiley">A Cheerful Headline</h2> Point That Way <h2>Point That Way<span class="dashicons dashicons-arrow-right"></span></h2> Obviously, CSS would need to be added…
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
Mac or PC? Add Body Class»
This can be useful for IE issues.
Javascript | Type: PHP
Make Gravity Forms 2.6+ Compatible with Ozh Admin Menu»
Add this to adminmenu.css.php in the plugin’s inc file (if Ozh updates, must be re-added): div.wrap.gforms_edit_form.gforms_form_settings_wrap, body.forms_page_gf_entries.auto-fold .gforms_edit_form { top:30px!important; }
Forms | Type: CSS
More WordPress tags to PHP Variables»
$pix = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); $title = get_the_title( $ID ); $eventlink = get_the_permalink(); $excerpt = get_the_excerpt(); $url = get_template_directory_uri();
PHP | Type: PHP
Move WordPress Admin Bar to Bottom»
Move admin bar to bottom to get it out of the way of menus at top on fixed heads.
CSS, Custom Admin, Users | Type: CSS