In my previous post, I showed you how to change default genesis favicon. Today, I want to share with you how to customize your footer text in your genesis child theme. The footer text is located in the bottom part of your website.
If you want to edit your current footer credit line in WordPress child theme for Genesis framework, here is how to do it.
Method 1 – Edit function.php
1. Open your Genesis child theme’s function.php (Appearance > Editor > functions.php)
2. Add below script. Change the ‘echo’ section to suit with your need.
/** Customize the credits */ add_filter( 'genesis_footer_creds_text', 'custom_footer_creds_text' ); function custom_footer_creds_text() { echo '<div class="creds"><p>'; echo 'Copyright © 2013 - '; echo date('Y'); echo ' · <a href="https://www.techniji.com">TechNiji</a> · Personal IT, How To and Tips'; echo '</p></div>'; }
3. Save
Or alternative php script with same result,
//* Do NOT include the opening php tag //* Change the footer text add_filter('genesis_footer_creds_text', 'sp_footer_creds_filter'); function sp_footer_creds_filter( $creds ) { $creds = '[footer_copyright] · Copyright 2014 Your Domain · All Rights Reserved · Powered by WordPress'; return $creds; }
Method 2 – Using Simple Edits plugin
For beginner, you can use the Simple Edits plugin for easy customizing genesis theme child footer. Download the plugin here.
Other footer customization code
1. Change the “Return to Top” of Page text on your site
Add below code to your function.php and change texts “Return to Top” with your favorite words.
//* Customize the entire footer remove_action( 'genesis_footer', 'genesis_do_footer' ); add_action( 'genesis_footer', 'sp_custom_footer' ); function sp_custom_footer() { ?> <p>© Copyright 2014 <a href="http://yourdomain.com/">Your Domain</a> · All Rights Reserved · Powered by <a href="http://wordpress.org/">WordPress</a></p> <?php }
2. Customize the entire footer text on your site
Open your function.php and add below code.
//* Customize the entire footer remove_action( 'genesis_footer', 'genesis_do_footer' ); add_action( 'genesis_footer', 'sp_custom_footer' ); function sp_custom_footer() { ?> <p>© Copyright 2014 <a href="http://yourdomain.com/">Your Domain</a> · All Rights Reserved · Powered by <a href="http://wordpress.org/">WordPress</a></p> <?php }