I want to show on my main page post from only one category so I wrote something like this in index.php:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php if (in_category('cat_number'))
in_category() inside the loop cause problem with post counting. posts_nav_link() on last page show "next page>>" like it should be next page witg post but it isn't. On click on "next page>>" empty page is showing. I am sure this is caused by counting posts witch are not in category limited by
How should I wrote loop to posts_nav_link work correctly.