• Resolved mildlyhotpeppers

    (@mildlyhotpeppers)


    I’m currently modifying the WordPress theme to work as a webcomic/flash movie site with a tiny blog for updates and small comments.

    https://www.mildlyhotpeppers.com/comics/ is the site under development.

    I have mostly everything working fine, except for the Next and Previous links at the bottom. Basically, I categorized each post into Comics, Movies, or Posts, and I use the category to display the proper posts depending on which part of the site the user is in.

    The Posts, I decided, would show up on the home page – I did this by putting inside the loop <?php if (!in_category('5')) continue; ?> where the category id of Posts is 5. (I found this in the WordPress documentation.) In doing this, however, the script still took into account the Comics and Movies posts – it just didn’t display them. This worked fine, until I realized that the front page showed 10 “posts,” INCLUDING the skipped ones. If you visit the site, you’ll see that there are only 3 visible posts, because the 7 other posts were skipped. If you click previous, you’ll get to another page with only 2 posts. If you click previous yet again, you’ll find another completely blank page. WordPress sees it as 10 posts, even though only a fraction are shown.

    I hope I’ve explained it clearly enough. Can anyone help me so that it’ll show 10 posts from the category “Posts” before giving the link to a previous page? (I used posts_nav_link(); for the links.)

  • The topic ‘Using Next/Previous Links w/ Only One Category’ is closed to new replies.