WordPress.org

Forums

Problems with NEXT and PREVIOUS tags (4 posts)

  1. stew278
    Member
    Posted 9 years ago #

    So I've got some problems with the next_posts_link and previous_posts_link actually going to the right entry on a web site - http://www.helengoesto.com/wp/

    The photos are entries in their own category, and I have used this line of code in the index.php file to block out other categories from displaying there:

    <?php c2c_get_random_posts($num_posts = 1,
    $format = "%post_content%",
    $categories = '2 3 4 6',
    $order = 'DESC',
    $date_format = '',
    $authors = '',
    $include_passworded_posts = false); ?>

    Then, where the written entry is (which is a different category), I have the usual tags for displaying content within the Loop. I am using the default tags for PREVIOUS and NEXT:

    <?php next_posts_link('&laquo; Previous Entries') ?>
    <?php previous_posts_link('Next Entries &raquo;') ?>

    ... but it doesn't work. Every time I click the "Previous Entry" link, the next page displayed is the same written content.

    Again, the temporary site is http://www.helengoesto.com/wp/ --- if you want to try testing out what I've attempted to describe here. I'm going to continue trying to work it out, but am in need of someone's help right now ...

    Thnx!

  2. stew278
    Member
    Posted 9 years ago #

    I did find this: http://trac.wordpress.org/ticket/2187

    So is this an unresolved issue? Is there a modification? Or do I scrap this version and downgrade to 1.5?

    Is there anyone out there who might have some info they can pass on about this issue?

  3. stew278
    Member
    Posted 9 years ago #

    I've found the culprit in my code, but have no idea how to clean it up to make the page work ...

    <?php if (is_home()) { query_posts("cat=-5"); } ?> is what I'm using to have the page ignore category 5 (which is the parent directory for all photo categories that are listed above the photo - ie. "Grand Canyon"), where the entry (written word) would go. The photos are randomly generated.

    What do I need to do to make this work?

  4. stew278
    Member
    Posted 9 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.