• Resolved fksr86

    (@fksr86)


    hey, everyone

    i’m having a little problem on my website

    on my home page, i need to exclude some categories. i’m using this with a query that exclude categories

    <?php query_posts('cat=-7,-102&showposts=15'); ?>

    but the posts_nav_link doesn’t work with this.

    i tried a traditional loop, using if ( in_category('7') || in_category('102')) } continue, but the posts showed on the home page changes depending on how much posts were excluded.

    what can i do?

Viewing 1 replies (of 1 total)
  • Thread Starter fksr86

    (@fksr86)

    well, i’ve found a solution.

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("cat=-7,-146&paged=$paged"); ?>

    using this $paged thing made my posts_nav_link work.

    thanks anyway!

Viewing 1 replies (of 1 total)
  • The topic ‘posts missing’ is closed to new replies.