This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT copy the opening PHP tag | |
add_filter( 'nav_menu_link_attributes', 'ck_attributes_nav_link', 10, 3 ); | |
function ck_attributes_nav_link( $atts, $item, $args ) { | |
if ( ! $args->menu->name == "Primary Navigation" ) | |
return; | |
$menu = wp_get_nav_menu_items( 'Primary Navigation' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening PHP tag | |
$args = array( | |
'header', | |
'nav', | |
'subnav', | |
'footer-widgets', | |
'footer', | |
'site-inner' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening PHP tag | |
//* Add viewport meta tag for mobile browsers | |
add_theme_support( 'genesis-responsive-viewport' ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening PHP tag | |
$args = array( | |
'search-form', | |
'comment-form', | |
'comment-list', | |
'gallery', | |
'caption' | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag | |
//* Load Google Fonts | |
add_action( 'wp_enqueue_scripts', 'ck_load_google_fonts' ); | |
function ck_load_google_fonts() { | |
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:400,700|Neuton:400', array(), CHILD_THEME_VERSION ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag | |
add_filter( 'body_class', 'ck_custom_body_classes' ); | |
function ck_custom_body_classes( $classes ) { | |
//* Create an empty value (or add a default to be applied everywhere) | |
$classes[] = ""; | |
if ( is_front_page() ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT copy this line or above | |
add_filter( 'body_class', 'ck_custom_body_class' ); | |
function ck_custom_body_class( $classes ) { | |
$classes[] = 'custom-class'; | |
return $classes; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Title: How to Add a Mobile-Friendly, Off Canvas Menu in Genesis | |
Author: Calvin Koepke (@cjkoepke) | |
Link: http://www.calvinkoepke.com/add-a-mobile-friendly-off-canvas-menu-in-genesis | |
*/ | |
/* Animation Settings and Classes | |
--------------------------------------------- */ | |
.off-canvas-active, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening PHP tag | |
/** | |
* Include the JavaScript | |
* @author Calvin Koepke (@cjkoepke) | |
* @link http://www.calvinkoepke.com/add-a-mobile-friendly-off-canvas-menu-in-genesis | |
*/ | |
add_action( 'wp_enqueue_scripts', 'ck_load_menu' ); | |
function ck_load_menu() { |