Hi, been trying out a custom query at the top of my sidebar but have the white screen of death when saving my functions.php. Firstly is this the best way to show links to the last five posts in my news category? If it is, where am I going wrong?
Code is;
/* ----- News Category Sidebar Query ----- */
function news_catloop(){
query_posts("numberposts=5&category_name=news");
if ($news_query->have_posts()) : while ($news_query->have_posts()) : $news_query->the_post();
<ul class="xoxo">
<h3 class="widgettitle">Latest News</h3>
<?php endwhile; else: ?>
<p>No Available News Posts</p>
<?php endif;
wp_reset_query();
}
add_action('thematic_abovemainasides', 'news_catloop');
Thanks
Steve