12/13/2016 - 4:59 PM

Go to top

Go to top

//* Do NOT include the opening php tag shown above. Copy the code shown below.

//* Create a shortcode to display custom Go to top link
add_shortcode('footer_custombacktotop', 'set_footer_custombacktotop');
function set_footer_custombacktotop($atts) {
    return '
        <a href="#" class="top">Return to top of page</a>

//* Add smooth scrolling for any link having the class of "top"
add_action('wp_footer', 'go_to_top');
function go_to_top() { ?>
    <script type="text/javascript">
        jQuery(function($) {
            $('').click(function() {
                $('html, body').animate({scrollTop:0}, 'slow');
                return false;
<?php }

//* Change the footer text
add_filter('genesis_footer_creds_text', 'sp_footer_creds_filter');
function sp_footer_creds_filter( $creds ) {
    $creds = '[footer_copyright] &middot; <a href="">My Custom Link</a> &middot; Built on the <a href="" title="Genesis Framework">Genesis Framework</a> &middot; [footer_wordpress_link] &middot; [footer_loginout] &middot; [footer_custombacktotop]';
    return $creds;