When your website means business.

Snippets

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.

Add search form to specific nav menu»

add_filter('wp_nav_menu_items', 'add_search_form', 10, 2); function add_search_form($items, $args) { if( $args->theme_location == 'MENU-NAME' ) $items .= '<li class="search"><form role="search" method="get" id="searchform" action="'.home_url( '/' ).'"><input type="text" value="search" name="s" id="s" /><input type="submit" id="searchsubmit"…
Nav Menu, Search | Type: PHP

Animate on Scroll»

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

Basic WP-query»

As basic as it gets, for clarity's sake.
WP Query | Type: PHP

Change WordPress Sender Email»

Less system-generated email will end up in spam folders if it's a legitimate email address.
WordPress | Type: PHP