WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pagination issue: everything works except when I click on a category name (3 posts)

  1. stupidzbu
    Member
    Posted 3 years ago #

    I recently spent 3 days figuring out how to properly paginate using a query string, but now when I click on a category, it doesn't discriminate and posts a bunch of random posts too.

    This is my code:

    <?php
    $temp = $the_query;
    $the_query= null;
    $the_query = new WP_Query();
    $the_query->query('cat=-'. $GLOBALS[ex_feat] . ',-' . $GLOBALS[ex_vid] . '&showposts=' . get_option('woo_other_entries') . '&orderby=post_date&order=desc'.'&paged='.$paged);
    
    $counter = 0;
    
    while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID;
    ?>
    	stuff
    
    <?php endwhile; wp_reset_query(); ?>

    It is a theme, so I don't understand all the variables called for in the query, but I have a sneaky sensation that the problem is there somewhere, or the lack of something being called..

    I just have no idea what to call it. I've seen multiple thread on how to post stuff from a particular category, but nothing on how to filter all posts in a category to a page URL.com/Category/cat_name

  2. stupidzbu
    Member
    Posted 3 years ago #

    actually, now that I test it out some more, nothing works at all. It just shows the same posts as the home page...

  3. stupidzbu
    Member
    Posted 3 years ago #

    fixed it .. was a problem with archive.php and archives.php

Topic Closed

This topic has been closed to new replies.

About this Topic