I have some trouble with one of my crappy sites. Ok, dont make fun of it now, you hear.. This is the site: http://carinsurance101.org/2010/03/ Or the archive, at least, and the archive is the problem. I had several posts that month, but only one showing up at the time. I gotta click "Previous Entries" or "Next Page" to see the others. Can anyone tell me how to fix it? I`d like for all the posts in a given month to come up on the same page, so that when you click "Previous" or "Next" you actually click your way to the next or previous month.
You will need to look at your code and make sure that for the page of a given month the sql selects all the posts dated in that month.
I know, but the problem is I dont know how to do that. What file to edit, what part of the text to edit etc.
Then you might be better posting the name of the software/package you use for your site and someone familiar with it may have the answer
Here is the archive coding, maybe someone can tell me what to edit. <?php get_header(); ?> <div id="wrapper"> <?php include (TEMPLATEPATH . '/menu.php'); ?> <div id="content" class="narrowcolumn"> <?php if (have_posts()) : ?> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?> <h2 class="pagetitle">Archive for the '<?php echo single_cat_title(); ?>' Category</h2> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2> <?php /* If this is a search */ } elseif (is_search()) { ?> <h2 class="pagetitle">Search Results</h2> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <h2 class="pagetitle">Author Archive</h2> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h2 class="pagetitle">Blog Archives</h2> <?php } ?> <div class="navigation"> <div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div> <div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div> </div> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3> <small><?php the_time('l, F jS, Y') ?></small> <div class="entry"> <?php the_excerpt() ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> <!-- <?php trackback_rdf(); ?> --> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div> <div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <?php include (TEMPLATEPATH . '/searchform.php'); ?> <?php endif; ?> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>
It's set up to only show one post at a time. That applies to all pages, including the archives. You either change the value for "Blog pages show at most" in admin, or else you edit the code in archive.php
I know, and what I posted is the code for archive.php. So what part of the code do I need to change, that is the question.
I think the only way to do that is a database query, which is a fair bit of coding. The Custom Post Limits plugin might be useful.