1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Only one post showing in archives

Discussion in 'HTML & Website Design' started by lurifax, May 21, 2010.

  1. #1
    I have some trouble with one of my crappy sites. Ok, dont make fun of it now, you hear.. :eek:

    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.
     
    lurifax, May 21, 2010 IP
  2. 50plus

    50plus Guest

    Messages:
    234
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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.
     
    50plus, May 21, 2010 IP
  3. lurifax

    lurifax Greenhorn

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    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.
     
    lurifax, May 21, 2010 IP
  4. 50plus

    50plus Guest

    Messages:
    234
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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
     
    50plus, May 21, 2010 IP
  5. lurifax

    lurifax Greenhorn

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #5
    The software I use? Wordpress?
     
    lurifax, May 21, 2010 IP
  6. lurifax

    lurifax Greenhorn

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #6
    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('','','&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php posts_nav_link('','Next Entries &raquo;','') ?></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 &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p>

    <!--
    <?php trackback_rdf(); ?>
    -->
    </div>

    <?php endwhile; ?>

    <div class="navigation">
    <div class="alignleft"><?php posts_nav_link('','','&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php posts_nav_link('','Next Entries &raquo;','') ?></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(); ?>
     
    lurifax, May 22, 2010 IP
  7. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #7
    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
     
    Cash Nebula, May 22, 2010 IP
  8. lurifax

    lurifax Greenhorn

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #8
    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.
     
    lurifax, May 22, 2010 IP
  9. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #9
    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.
     
    Cash Nebula, May 22, 2010 IP