Where is that code from? What template file? Do you have a category.php template? If not, try creating one by copying your archive.php file.
That code is from archive.php. I do not have a category.php. If I create one how would I link to it rather then the archives page.
You don’t need to link to it. WP will use the category.php template file every time someone clicks on a category link in your site.
I tried that and it still pulls content from all categories instead of just one. I am missing something?
<?php get_header(); ?>
<div class="breadcrumb">
<?php
if(function_exists('bcn_display'))
{
bcn_display();
}
?>
</div>
<div id="content">
<div class="minipost">
<?php if (have_posts()) : query_posts('posts_per_page=12') ?>
<?php while (have_posts() && $postNumber < 6) : the_post();$do_not_duplicate = $post->ID ?>
<div class="hentry">
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php $screen = get_post_meta($post->ID,'screen', true); ?>
<img src="<?php echo ($screen); ?>" width="310" height="100" alt="" />
<?php the_excerpt(); ?>
</div>
<div class="meta">
<div class="timer"><?php the_time('j F Y') ?></div>
<div class="more"> <a href="<?php the_permalink() ?>">Read More</a></div>
</div>
<?php $postNumber++; endwhile; ?>
</div>
<div class="minipost">
<?php
while (have_posts() && $postNumber < 12) : the_post();$do_not_duplicate = $post->ID; ?>
<div class="hentry">
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php $screen = get_post_meta($post->ID,'screen', true); ?>
<img src="<?php echo ($screen); ?>" width="310" height="100" alt="" />
<?php the_excerpt(); ?>
</div>
<div class="meta">
<div class="timer"><?php the_time('j F Y') ?></div>
<div class="more"> <a href="<?php the_permalink() ?>">Read More</a></div>
</div>
<?php $postNumber++; endwhile; endif; ?>
</div>
<div class="navigation">
<?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?>
</div>
</div>
<?php get_sidebar(); ?>
<div class="clear"></div>
<?php get_footer(); ?>
Please don’t post huge chunks of code here. For larger blocks of code, use the WordPress pastebin and post the pastebin url here. It makes life easier for everyone.
Try this instead.
Sorry about that. I will make sure to use that next time. That did work for me I just need to edit it now for my layout thanks.