tags:

views:

545

answers:

1

Below is the code I am using. I have tried everything I have been able to find and it still doesn't work. My permalink structure is /%category%/%postname%/. I believe that the url is correct that it is trying to go to i.e. http://localhost:8888/wordpress/blog/page/2. Annoyingly, the exact same code works on another site I have designed previously.

Could someone point me in the right direction please? Thanks

<?php get_header(); ?>
 <div id="content" class="narrowcolumn">
 <?php 
  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  query_posts("cat=3&showposts=2&paged=" . $paged);

  $wp_query->is_archive = true; $wp_query->is_home = false;
 ?>

 <?php if (have_posts()) : ?>
 <div id="lefttop"></div>

 <div id="blogpoint">
 <div id="leftcol">
  <?php while (have_posts()) : the_post(); ?>

   <div id="leftsquidge">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2><br /><br />

     <?php the_excerpt(); ?>
   </div> 
   <div id="rightsquidge">
    <?php the_tags( '<p><strong>File under:</strong> ', ', ', '</p>'); ?>
    <?php the_time('F jS, Y') ?>  by <strong><?php the_author() ?></strong>
   </div>
   <div style="clear:both;"></div> 
   <br /><br />
  <?php endwhile; ?>
  <div class="navigation" style="padding:0px;margin:0px;">
   <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
   <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
  </div>
 <?php endif; ?> 
  <div style="clear:both;"></div> 
  </div>

  </div>
  <div id="leftbot"></div>
 </div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>


EDIT

I have answered my own question. It was something I had tried before and wasn't working. You have to create a page, on the dashboard, that uses your category as the template.

A: 

If the same code works fine in another site then check your settings for this site. Compare your permalinks settings on both the sites.

Does both the site work on the same environment (Apache or iis)?

Shoban
Yeah, the settings are the same on both sites. The site that works runs on apache and this site runs locally at the moment.
Drew
on a mamp sertup
Drew