WEB Wordpress help

Discussion in 'OT Technology' started by m3s3lf, Oct 1, 2009.

  1. m3s3lf

    m3s3lf *Jeep Crew*

    Joined:
    Oct 4, 2001
    Messages:
    5,460
    Likes Received:
    0
    Location:
    Sacramento, CA
    I've got THIS custom archive page (code below) setup on my site. The problem is, for some reason, it only shows 5 posts per category (which you can see under the "Front Axle" category). All 6 posts show up HERE and when I remove one of the posts that are displayed from that category, the missing post shows up.

    I just don't see anything in here that would be limiting the number of posts returned. Anybody know what the deal is?

    Thanks!

    Code:
    <?php get_header(); ?>
    
    	<div id="content">
    
    		<?php if (have_posts()) : ?>
    
    		 <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    <div class="entry">
    
    		<?php /* If this is a category archive */ if (is_category()) { ?>
    		<h2>Posts in the ‘<?php single_cat_title(); ?>’ Category</h2>
    		<small>(reverse chronological order)</small>
    
    		<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    		<h2>Posts in <?php the_time('F jS, Y'); ?></h2>
    		<small>(reverse chronological order)</small>
    
    		<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    		<h2>Posts in <?php the_time('F, Y'); ?></h2>
    		<small>(reverse chronological order)</small>
    
    		<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    		<h2>Posts in <?php the_time('Y'); ?></h2>
    		<small>(reverse chronological order)</small>
    
    	  	<?php /* If this is an author archive */ } elseif (is_author()) { ?>
    		<h2>Author Archive</h2>
    		<small>(reverse chronological order)</small>
    
    		<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    		<h2>Blog Archives</h2>
    		<small>(reverse chronological order)</small>
    
    		<?php } ?>
    </div>
    <div class="entry">
      <div class="post">
    <?php $cats = get_categories("child_of=4"); ?>
    
    <?php if($cats != NULL) { ?>
    		<ul>
    		<?php foreach ($cats as $cat) { ?>
    			<li>
    
    			<?php if($cat != NULL) {
    				$base_url = get_bloginfo('home') . "/?cat=" . $cat->cat_ID; ?>
    				<p /><h3><a href="<?php echo $base_url?>"><?php echo $cat->cat_name?></a></h3>
    			<?php } ?>
    
    				<?php $myposts = get_posts("category=$cat->cat_ID"); ?>
    				<ul>
    				<?php foreach($myposts as $post) : ?>
    					<li><?php the_time('M d') ?>. <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    				<?php endforeach; ?>
    				</ul>
    			</li>
    	<?php } ?>
    		</ul>
    <?php } ?>
      </div>
    </div>
    		
    
    
    	<?php else : ?>
    <div class="entry">
    		<h2 class="center">Not Found</h2>
    <div class="entry">
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
     
  2. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
  3. m3s3lf

    m3s3lf *Jeep Crew*

    Joined:
    Oct 4, 2001
    Messages:
    5,460
    Likes Received:
    0
    Location:
    Sacramento, CA
    You rock.
    I appreciate it!
    Billy
     

Share This Page