Old Theme: error in footer, want to fix
-
I’m using a theme which is the one I find most comfortable, but it hasnt been updated in forever, and theres an error in the footer, where the theme author, and copyright info go. I’d be really grateful if someone could take a look at
Warning: Missing argument 2 for wpdb::prepare(), called in /home/suewotto/public_html/wp-content/themes/inove/footer.php on line 22 and defined in /home/suewotto/public_html/wp-includes/wp-db.php on line 1147
and then tell me where this code doesnt work..
<div id="copyright"> <?php global $wpdb; $post_datetimes = $wpdb->get_row($wpdb->prepare("SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM $wpdb->posts WHERE post_date_gmt > 1970")); if ($post_datetimes) { $firstpost_year = $post_datetimes->firstyear; $lastpost_year = $post_datetimes->lastyear; $copyright = __('Copyright ? ', 'inove') . $firstpost_year; if($firstpost_year != $lastpost_year) { $copyright .= '-'. $lastpost_year; } $copyright .= ' '; echo $copyright; bloginfo('name'); } ?> </div>
Thanks in advance (the error here is line 4, I havent posted the entire code for the section which puts it at line 22)
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Old Theme: error in footer, want to fix’ is closed to new replies.