Skip to content

Instantly share code, notes, and snippets.

@anwerashif
Last active October 28, 2017 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anwerashif/c966298c2e5277b722c2bd66dded4882 to your computer and use it in GitHub Desktop.
Save anwerashif/c966298c2e5277b722c2bd66dded4882 to your computer and use it in GitHub Desktop.
Customize Genesis Site Footer Text
<?php
//Don't include PHP tag
// Customize the footer section
add_filter('genesis_footer_creds_text', 'bdfg_footer_creds_text');
function bdfg_footer_creds_text($creds) {
global $wpdb;
$table = $wpdb->prefix . 'posts';
$lastDate = date('Y');
$firstDate = $wpdb->get_var("SELECT YEAR(post_date) FROM $table ORDER BY post_date LIMIT 1");
$text = __('<a href="https://wealthylevelup.com/">WealthyLevelUp</a>® &middot; Made with <i class="fa fa-heart"></i> in Canada &middot; Design by <a href="http://rainastudio.com/" target="_blank">RainaStudio</a>', 'genesis');
if($lastDate == $firstDate) $creds = "© $firstDate " .$text;
else $creds = "© $firstDate " .$text;
return $creds;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment