Forums

"older posts" feature not working in custom theme (6 posts)

  1. maggiek
    Member
    Posted 1 year ago #

    The older & newer posts links @ the bottom of my categories & archive pages only link back to the same page. The URL changes (shows "/page/2/") but the posts it displays are the same...is there a bit of code that I need to add?

    Here's the blog/page I'm working on: buildingtomorrow.org/zeta/blog

    It's currently set to only show the newest 6 posts...so there are definitely older posts somewhere...just can't get them to appear?

    The only line of code I'm using right now for that part is:
    <?php posts_nav_link(' — ', __('« Newer Posts'), __('Older Posts »')); ?>

    Help?

  2. vtxyzzy
    Member
    Posted 1 year ago #

    It is possible that this is part of a known problem with pagination and pretty permalinks. Try using the default permalinks and see if the problem goes away.

  3. altoidboy
    Member
    Posted 1 year ago #

    I'm having the same problem. How does one use "the default permalinks"?

    I inserted this code near the bottom of my home.php:

    <?php posts_nav_link(' -- ','newer','older'); ?>

    But, just as in maggiek's post, the link leads to myurl.com/page/2 but the same content as the home page appears (not the older posts).

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Does the relevant theme template file use a custom query? If so, it probably needs amending.

  5. altoidboy
    Member
    Posted 1 year ago #

    [I'm newer to WP.] Can you explain what a custom query is, or how I would identify that this theme is using one? Link to site-in-progress.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic