Skip to content

Instantly share code, notes, and snippets.

@studiopress
Last active April 26, 2023 15:09
Show Gist options
  • Save studiopress/5700192 to your computer and use it in GitHub Desktop.
Save studiopress/5700192 to your computer and use it in GitHub Desktop.
Genesis footer.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize the credits
add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' );
function sp_footer_creds_text() {
echo '<div class="creds"><p>';
echo 'Copyright &copy; ';
echo date('Y');
echo ' &middot; <a href="http://mydomain.com">My Custom Link</a> &middot; Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>';
echo '</p></div>';
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* 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="http://mydomain.com">My Custom Link</a> &middot; Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>';
return $creds;
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Reposition the footer
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
add_action( 'genesis_after', 'genesis_footer_markup_open', 11 );
add_action( 'genesis_after', 'genesis_do_footer', 12 );
add_action( 'genesis_after', 'genesis_footer_markup_close', 13 );
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize the return to top of page text
add_filter( 'genesis_footer_backtotop_text', 'sp_footer_backtotop_text' );
function sp_footer_backtotop_text($backtotop) {
$backtotop = '[footer_backtotop text="Return to Top"]';
return $backtotop;
}
@yeiichi
Copy link

yeiichi commented Jul 7, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment