Friday, January 2, 2015

WordPress : How to fix Inove Theme footer

Hi there! INove WP theme by NeoEase are my most favourite theme and sadly this theme has been retired. The last update was version 1.4.6, released on 2009.

If you are using WordPress 3.9+, you probably will get a warning about missing argument on function wpdb::prepare() which affected you website to display the copyright year on footer section. So I would like to share how to fix this problem :)

First of all, you need to modify footer theme file (wp-content/themes/inove/footer.php) and find this line of code as below :

$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"));

Then select all of thus code and replace it with this code :

$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 > %s",'1970'));

Save and upload it back to your web server. Now try to access you website. The warning notice are now gone. That all.

P/s : Actually, INova was my Wordpress theme before I migrate to Blogger, such a sweet old times memories.

1 comment:

  1. It delivers incredible result to the business owners to boost their business online presence and enjoy maximum leads. CodCow

    ReplyDelete