Support » Fixing WordPress » Only Two Pages of Posts Showing

  • I’m working on a new and relatively complex layout for my site, using lots of query_posts and etc tricks, mainly the Multiple Loops Version 2 trick… I don’t really think that’s related to this issue, but it may be.

    I’m running a regular good ol’ fashion loop for my category pages. Nothing weird or anything, just a regular loop. For some reason, when you page through to the previous entries, that’s it. It wont let you page through to any more entries. It’ll only go to page/2 and then it wont continue on any further. This is strictly specific to my new design.

    You can view the problem in action here: http://ihavebeenfloated.org/category/personal/

    And the format of my loop is as follows, pretty much the Kubrick loop verbatim:

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>

    <div class="post-container">
    <div class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></div>

    <div class="post-content">
    <?php the_content('Read More &raquo;');?>
    </div>

    <div class="post-date"><?php the_time('F j, Y'); ?></div>
    <div class="post-comments"><a href="#">View or Leave Comments</a></div>

    </div>

    <?php endwhile; ?>

    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>

    <?php else : ?>

    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.

    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    <?php endif; ?>

    The extra query-post loops I’m running in the left bar look like this:

    <?php $my_query = new WP_Query('showposts=1&cat=3'); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <div class="small-post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></div>
    <div class="small-post-content">
    <?php the_excerpt() ?>
    </div>
    <div class="small-post-date"><?php the_time('F j, Y'); ?></div>
    <div class="small-post-more"><a href="<?php the_permalink() ?>">Read More</a></div>
    <?php endwhile; ?>

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter amiantos

    (@amiantos)

    Also, you can manually go to pages past the second page, so although the Prev links stop at http://ihavebeenfloated.org/category/personal/page/2/

    You can still go to http://ihavebeenfloated.org/category/personal/page/3/ and get more posts.

    I have this same problem. Can anyone link to a thread where its been resolved?

    I can’t understand why I can only find similar questions to this but never answers. I have a multiple loop that I use on a front page. It only shows the title and I want it to link to my categories. For example…”index.php/categories/blog/” as opposed to “index.php/categories/essays/”. I used the multiple loop and the first one links to my latest post in the “blog” category. Pressing the previous nav link makes the address change to blog/page/2 but it doesnt call the previous entry. When I click on the second loop to get to the “essays” category it goes to the latest post in the blog category and has the same nav link problem.

    I have tried different combinations of multiple loop code and it doesn’t work. There have been a bunch of similar questions in support but no concrete answers. Is it a problem with my query-ing on the front page? Or is it an issue of my nav links in my main template?

    I’m stuck.

    I will send someone a rare species of monkey if they help me fix the multiple loop or direct me to a place where I can find the answer. I know others have asked the same thing but I can’t find the answer. I will look again.

    I will also hunt the monkey in preparation.

    *ahem”

    http://wordpress.org/support/topic/57912#post-312858

    I await the monkey. Not a knife-wielding species, correct?

    (When are we gonna get search fixed on these forums!?)

    Much appreciated. I’ll give that a try. The monkey’s in the mail. If it doesn’t get there, I blame customs…or the lack of holes in the box.

    Alright. I guess I don’t know how to use that for my situation. I have a static home.php page. The main thing is I want to group my posts in two distinct categories…’blog’ and ‘entries.’ Then I want people to navigate through that category…one post per page. i.e. They will get the title of the most recent post in each category in home.php…this will lead them to the category which they can navigate through. Sorry if that was entirely repetitive.

    When I click on the category link the navigation works fine. When I try to link there from my home page loops the navigation doesn’t work, as I stated a couple posts above. Here is the code for my ‘static’ home page with loops.

    http://pastebin.com/529817

    I’m sure I’ve been complicating matters in some way or another.

    guiggster, to make sure I get how you want things to work:

    * Blog (category) displays one post on the home page.

    * Entries (category) also has one post on home page.

    * A “next” link will exist for each.

    * Clicking “next” takes the reader into the category for that post, but displays the next post within the category.

    Does that cover it?

    Actually, on the home page, I want the ‘Blog’ category to simply display the latest title. I want the ‘Entries’ category to display the title and excerpt. Clicking on the displayed title will bring you to my main template to read the one post per page specific category (i.e. “index.php/categories/Blog/” or “index.php/categories/Entries/” posts.

    Obviously at the bottom of the page there will be navigation to go to the previous Blog post, or Entries post, depending on which category you are in. This is what I’m having problems with.

    I want to mimic what I have in my current website http://thejinx.org/ except when I start using wordpress I’d like to have two different kinds of blogs going…but keep them separate.

    I appreciate your help. I’m a long way from being finished, but I’m starting to worry that I’ll have to stagger my questions so as not to look too needy.

    Well, if I *am* understanding what you’re looking to do, this plugin should help:

    http://mattread.com/archives/2006/01/custom-query-string-27/

    You can assign by query type how many posts to display per page, and you can configure for individual categories. You should be able to then page through categories, one post (or as many as you want) per page, using the standard template tag for this:

    http://codex.wordpress.org/Template_Tags/posts_nav_link

    Also see the info on Codex for category templates, which may be helpful in this:

    http://codex.wordpress.org/Category_Templates

    Stagger away.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Only Two Pages of Posts Showing’ is closed to new replies.