show one category on home.php
-
I think I am going mad but I can not get my home.php to just display one category? Can any one help I have read lots and as far as I can tell I am doing as they say and it’s just not working?
Any help will be greatly appreciated? see below…
<?php
get_header();
?><?php query_posts('cat=31'); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="entry">
<h3 class="entrytitle" id="post-<?php the_ID(); ?>"> <a>" rel="bookmark">
<?php the_title(); ?>
</a> </h3>
<div class="entrymeta"> Posted
<?php
the_time('F j, Y ');
$comments_img_link= '<img src="' . get_stylesheet_directory_uri() . '/images/comments.gif" title="comments" alt="*" /><strong>';
comments_popup_link($comments_img_link .' Comments(0)', $comments_img_link .' Comments(1)', $comments_img_link . ' Comments(%)');
edit_post_link(__(' Edit'));?>
</strong> </div>
<div class="entrybody">
<?php the_content(__('Read more »'));?>
<div class="sociable">
<?php if(function_exists('wp_email')) { email_link(); } ?>
</div>
</div>
<!--
<?php trackback_rdf(); ?>
-->
</div>
<?php comments_template(); // Get wp-comments.php template ?>
<?php endwhile; else: ?>
<p>
<?php _e('Sorry, no posts matched your criteria.'); ?>
</p>
<?php endif; ?>
<p>
<?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>
</p></div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
- The topic ‘show one category on home.php’ is closed to new replies.