Skip to content

Instantly share code, notes, and snippets.

@krmd
krmd / gist:d5c10c1f0c1f37323cfe
Created May 30, 2014 15:18
WooTheme Canvas: Header Widget
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name' => 'Header Widget',
'id' => 'header-widget',
'description' => 'This is a widgetized area in the right side of the header.',
'before_widget' => '<div id="%1$s" div class="widget">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
@krmd
krmd / gist:ce7d3e36793dafd82a2a
Created May 30, 2014 15:15
WooTheme Canvas: Add Social Media Icons to Navigation
add_filter( 'wp_nav_menu_items', 'woo_custom_add_sociallink_navitems', 10, 2 );
function woo_custom_add_sociallink_navitems ( $items, $args ) {
global $woo_options;
if ( $args->theme_location == 'primary-menu' ) {
$template_directory = get_template_directory_uri();
$profiles = array(