- Original Poster
- #1
http://redwood-tints.co.uk/
Just noticed I've got a fault in my sidebar since the last update. I made the site myself a couple of years ago and am not a web designer. Is there an obvious fault here, or an easy solution?
<div class="side-box">
<ul id="copyrights">
<li>
<?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 © ', 'piano-black') . $firstpost_year;
if($firstpost_year != $lastpost_year) {
$copyright .= '-'. $lastpost_year;
}
$copyright .= ' ';
echo $copyright;
}
?>
<a href="<?php echo get_option('home'); ?>/"><div class="org">Redwood Window Tinting</div></a></li>
<li><div class="adr">
<div class="street-address">111-117 St George's Road</div></li>
<li><span class="locality">Bristol</span></li>
<li><span class="postal-code">BS1 5UW</span></div></li>
</ul>
</div>
Thankyou.
Just noticed I've got a fault in my sidebar since the last update. I made the site myself a couple of years ago and am not a web designer. Is there an obvious fault here, or an easy solution?
<div class="side-box">
<ul id="copyrights">
<li>
<?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 © ', 'piano-black') . $firstpost_year;
if($firstpost_year != $lastpost_year) {
$copyright .= '-'. $lastpost_year;
}
$copyright .= ' ';
echo $copyright;
}
?>
<a href="<?php echo get_option('home'); ?>/"><div class="org">Redwood Window Tinting</div></a></li>
<li><div class="adr">
<div class="street-address">111-117 St George's Road</div></li>
<li><span class="locality">Bristol</span></li>
<li><span class="postal-code">BS1 5UW</span></div></li>
</ul>
</div>
Thankyou.