这是一次修复边栏代码的尝试:
<div id="rightcolumn-wrapper">
<div class="rightcolumn-inner">
<?php /* Widgetized sidebar */
if ( !function_exists(\'dynamic_sidebar\') || !dynamic_sidebar(\'sidebar\') ) : ?>
<?php /* If a title has been provided, we\'ll use that. */
$NewsTitle=get_option(\'NewsTitle\');
if ($NewsTitle) {
echo \' <h3 class="news">\';
echo $NewsTitle;
echo \'</h3>\';
// Otherwise we\'ll use a generic message.
} else { ?>
<h3>Recent News</h3>
<?php } ?>
<?php
$News=get_option("News");
$news_Query = new WP_Query(array(
\'cat\' => $News,
\'posts_per_page\' => get_option("newspostlimit"),
\'post_type\' => \'post\'
));
?><ul class="news">
<?php while ($news_Query->have_posts()) : $news_Query->the_post(); ?>
<li>
<strong><?php the_time(\'F jS, Y\') ?> : </strong>
<br />
<?php the_title(); ?> :
<a href="<?php the_permalink() ?>">
<?php the_content_rss(\'cut\', TRUE, \'\', 20); ?>
</a>
<a href="<?php the_permalink() ?>" class="view-more"> </a>
</li>
<?php endwhile;
wp_reset_query(); ?>
</ul>
<?php /* If a title has been provided, we\'ll use that. */
$TestimonialTitle=get_option(\'TestimonialTitle\');
if ($TestimonialTitle) {
echo \' <h3 class="news">\';
echo $TestimonialTitle;
echo \'</h3>\';
// Otherwise we\'ll use a generic message.
} else { ?>
<h3>Testimonial</h3>
<?php
}
$Testimonial=get_option("Testimonial");
$testi_Query = new WP_Query(array(\'cat\'=> $Testimonial, \'posts_ter_page\' => get_option("Testimonialpostlimit")));
?>
<ul class="testimonial">
<?php while ($testi_Query->have_posts()) : $testi_Query->the_post(); ?>
<li>
<?php the_content_rss(\'cut\', TRUE, \'\', 20); ?>
<br />
<strong>
<?php the_title(); ?>
</strong>
<a href="<?php the_permalink() ?>" class="view-more"> </a>
</li>
<?php endwhile;
wp_reset_query(); ?>
</ul>
<ul>
<li>
<?php /* If a title has been provided, we\'ll use that. */
$ContactInfoTitle=get_option(\'ContactInfoTitle\');
if ($ContactInfoTitle) {
echo \' <h3 class="contact-info">\'.$ContactInfoTitle.\'</h3>\';
// Otherwise we\'ll use a generic message.
} else { ?>
<h3 class="contact-info">Contact Info</h3>
<?php
}
$ContactInfo=get_option(\'ContactInfo\');
if ($ContactInfo) {
echo stripslashes($ContactInfo);
// Otherwise we\'ll use a generic message.
} else { ?>
<p>Mauris a libero metus, vel blandit lectus. Praesent egestas ultrices turpis eget vestibulum. Pellentesque ligula sem, porta nec venenatis vel, volutpat non tortor. </p>
<?php } ?>
</li>
</ul>
<ul>
<li>
<?php /* If a title has been provided, we\'ll use that. */
$SocialTitle=get_option(\'SocialTitle\');
if ($SocialTitle) {
echo \' <h3 class="news">\'.$SocialTitle.\'</h3>\';
// Otherwise we\'ll use a generic message.
} ?>
<div class="socil-book-marks">
<?php
$TwitterID=get_option(\'TwitterID\');
$FacebookID=get_option(\'FacebookID\');
$FlickrID=get_option(\'FlickrID\');
$DeliciousID=get_option(\'DeliciousID\');
$TechnoratiID=get_option(\'TechnoratiID\');
if($TwitterID) { ?>
<a href="<?php echo get_option(\'TwitterID\'); ?>"><img src="<?php bloginfo(\'template_url\'); ?>/images/twitter.png" alt="twitter" /></a>
<?php }
if($FacebookID) { ?>
<a href="<?php echo get_option(\'FacebookID\'); ?>"><img src="<?php bloginfo(\'template_url\'); ?>/images/facebook.png" alt="myspace" /></a>
<?php }
if($FlickrID) { ?>
<a href="<?php echo get_option(\'FlickrID\'); ?>"><img src="<?php bloginfo(\'template_url\'); ?>/images/flicker.png" alt="flickr" /></a>
<?php }
if($DeliciousID) { ?>
<a href="<?php echo get_option(\'DeliciousID\'); ?>"><img src="<?php bloginfo(\'template_url\'); ?>/images/delicious.png" alt="delicious" /></a>
<?php }
if($TechnoratiID) { ?>
<a href="<?php echo get_option(\'TechnoratiID\'); ?>"><img src="<?php bloginfo(\'template_url\'); ?>/images/technorati.png" alt="technorati" /></a>
<?php } ?>
</div>
</li>
</ul>
<?php endif; ?>
</div>
</div>
<!-- End Main section #main -->
<div class="clear"></div>