• Resolved 157gs

    (@157gs)


    I’ve been searching here at the forums, the documentation and the internet in general and I can’t believe I haven’t found a solution for this yet.

    I am trying to get my Archive.php page to display a montly archive of 50 entries at a time. Right now (I’m working locally so I can’t link to it right now) it just shows a single entry and a user must paginate back via “previous entries” to view other posts from that month.

    If I place this code it does show 50 posts at a time:
    <?php $posts = query_posts('showposts=50');?>
    but if have more than 50 posts – when I paginate via “previous entries” to another page, it just shows the same exact same 50 entries instead of more from the archive.

    Is there any way to do this? Thanks for any help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Are you wanting to display a list of 50 at a time, like this:

    title of a post
    title of another post

    etc.

    I assume you aren’t displaying the entire post but a link, correct? I think there is a plugin that paginates but I’m not sure how far it goes. Let me try to find it for you.

    Thread Starter 157gs

    (@157gs)

    I assume you aren’t displaying the entire post but a link, correct?

    Yes, that’s correct. I’ve actually customized what it’s returning on the query. It does return the title, date, and a summary of the post.

    But it’s not about the actual single post, I’m just trying to dump at least 50 posts onto a single page at a time. I will certainly look at a plugin, though I thought I would rather get in over my head and try to hack it myself. =)

    Cheers.

    This one paginates posts but don’t know if that applies to archives or not:
    http://anthologyoi.com/awp

    Don’t know about this one, it doesn’t mention pagination, but either of these might have some useful code in them if you are of a mind to “roll your own”. 😛
    http://www.learncpp.com/wordpress/category_archive_indexing_plugin/

    Thread Starter 157gs

    (@157gs)

    Hey jonimueller, thanks for those links. I’ll check those out and post back here with a solution if I’m able to come up with one…..

    Thanks again.

    Thread Starter 157gs

    (@157gs)

    Those links didn’t really work out but I did find this:
    http://www.transycan.net/blogtest/2007/10/30/custom-query-string-reloaded-for-wordpress-23-with-tag-support/

    This does what I want but is a bit bloated for what I want to do. It seems like overkill to just simply show multiple posts at once…

    anybody else have any ideas?

    Thread Starter 157gs

    (@157gs)

    aha! I think this one is resolved. I was headed down the correct path with:

    <?php $posts = query_posts('showposts=50');?>

    but apparently, that overrides the original query and that’s why it was messing up pagination. (see this post: http://wordpress.org/support/topic/115740?replies=5)

    Once I added $query_string, it seemed to fix the pagination issue:

    <?php query_posts($query_string.'&showposts=2'); ?>

    hope this helps others looking to add multiple posts to specific pages.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Showing multiple posts on Archive page’ is closed to new replies.