Created
January 16, 2014 22:47
-
-
Save kristarella/8465003 to your computer and use it in GitHub Desktop.
Back to top link that works in Genesis HTML5 framework
This file contains 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 | |
// custom header ID for backtotop | |
add_filter('genesis_attr_site-header','mytheme_header_id',1); | |
function mytheme_header_id($atts) { | |
$atts['id'] = "header"; | |
return $atts; | |
} | |
// back to top link | |
add_action('genesis_footer','mytheme_backtotop'); | |
function mytheme_backtotop() { | |
$atts = array( | |
'before' => '<div id="backtotop">', | |
'after' => '</div>', | |
'href' => '#header' | |
); | |
echo genesis_footer_backtotop_shortcode($atts); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment