• Hello, guys / girls?

    I’m hidding some articles from view in LOOP via following code:


    <?php if (have_posts()): ?>
    <?php while (have_posts()) : the_post(); ?>
    <? if(!in_category(500)): ?> //show article


    but post_nav_link() function counts all posts so there is a problem, when I have 11 posts in database and 10 per page setting, I see link to “older articles” but 11th article is not visible of course so page no. 2 is empty.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘posts_nav_link and excluded articles’ is closed to new replies.