Last active
October 28, 2017 16:49
-
-
Save anwerashif/c966298c2e5277b722c2bd66dded4882 to your computer and use it in GitHub Desktop.
Customize Genesis Site Footer Text
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 | |
//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>® · Made with <i class="fa fa-heart"></i> in Canada · 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