Forums

Hemingway and Prev/Next-links to index-pages (6 posts)

  1. risach
    Member
    Posted 5 years ago #

    Hi,

    I am (desperately...) trying to implement in my Hemingway-themed WP2.1-blog links to previous posts: something which can be done on Kubrick (or some other theme) by WP's posts_nav_link-tag.
    On Hemingway, posts_nav_link gives you (next to) nothing.

    I would like to have something like that: Hemingway'ed WP displays the first 2 (or some other number) posts on the start/homepage; then, at the bottom, there should be a link to a page where 2 (or a different number, but the same as on the homepage) previous posts are displayed, etc.

    Of course, on the second and higher pages, there should also be a link to the page with the next more recent posts.

    Basically, something totally simple and common. Not so in Hemingway.

    Apparently, something is wrong (or very different) about the way Hemingway handles index-pages, ie.:
    there seems to be nothing like:

    http://<wp-domain>/index.php?paged=2
    http://<wp-domain>/index.php?paged=3
    etc

    if you try to let pages with these url's be displayed, Hemingway always falls back to the startpage.
    To my understanding, it is precisely because there is nothing like /index.php?paged=2 etc that posts_nav_link-tag fails to work as exspected.

    Sorry, if I describe matters in an awkward way. I really dont understand what's going on, and why Hemingway is so stubborn.

    I did read and (tried to) digest information like:
    http://codex.wordpress.org/Template_Tags/previous_post_link
    http://codex.wordpress.org/Next_and_Previous_Links

    There's also lot of discussion on Hemingway's forum:
    http://discuss.warpspire.com/
    for instance:
    http://discuss.warpspire.com/viewtopic.php?pid=2201#p2201
    http://discuss.warpspire.com/viewtopic.php?id=527
    http://discuss.warpspire.com/viewtopic.php?id=497
    http://discuss.warpspire.com/viewtopic.php?id=40

    An ideal result would be having something that can be seen (thou on a Typo-powered site) on:

    http://www.redchocolate.ca/

    "Older posts: 1, 2, 3 [...]"

    Thanks for your help.

    Best,
    risach

  2. nmallory
    Member
    Posted 4 years ago #

    Did you find a solution for this? I tried to implement this last night myself and ran into the same issue.

  3. moshu
    Member
    Posted 4 years ago #

    Many themes, like Hemingway, have a custom query in their Loop - and that usually borkes the prev/next navigation.

  4. guboogi
    Member
    Posted 4 years ago #

    Has anyone figured out how to do this? At the moment, the Hemingway discussion forums seem down and I would really like to add Prev/Next links to my index page. Also, if anyone has figured out how to do an all-inclusive archives (not just monthly or even yearly) that would help out as well. Thanks!

  5. guboogi
    Member
    Posted 4 years ago #

    Okay, after doing a bit more searching, I found the answer here: http://wordpress.org/support/topic/103819?replies=8

    For anyone interested, there is a bit of code in the index.php file of the Hemingway theme that says:

    // Here is the call to only make two posts show up on the homepage REGARDLESS of your options in the control panel
    query_posts('showposts=2');

    This shows the most recent 2 (or however many specified) posts regardless of the page number. That's why the previous/next page links were always grabbing the stories shown on the index page. So the solution is to simply remove those lines of code, add previous/next link code wherever you'd like them, and control the number of posts per page from the usual WordPress dashboard Options page.

  6. moshu
    Member
    Posted 4 years ago #

    :)

Topic Closed

This topic has been closed to new replies.

About this Topic