Support » Plugins » Hacks » Help! Pagination issue with Tags

  • Resolved squeaker2


    Thanks to Esmi for his last snippet of code on my last issue with category… worked like a charm! Now, I thought I could apply the same logic with tags… but no such luck. Pretty much the same issue, but now with tags and I don’t understand why this wont work, it is the exact same concept.

    <?php if (isset($_GET['searchCat'])){
    			$myCAT = $_GET['searchCat'];
    			$hideheader = 'true';
    			$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    			query_posts('category_name='.$myCAT.''.'&posts_per_page='.$limitPagePosts.'&paged=' . $paged);
    			else if (isset($_GET['tag'])){
    			$myTAG = $_GET['tag'];
    			$hideheader = 'true';
    			$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    			query_posts('tag='.$myTAG.''.'&posts_per_page='.$limitPagePosts.'&paged=' . $paged);
    			else { query_posts($query_string.'&posts_per_page='.$limitPagePosts.'');}
    		<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    <?php endwhile; ?>
    		<?php endif; ?>

    Once again.. pagination determines the correct amount of posts attached to the tag, but when I click page 2… I get a Yahoo 404 error. Any ideas why this same logic won’t work? The category code works flawlessly. Weird.

Viewing 1 replies (of 1 total)
  • To solve this, I just changed tag to tagged… WP uses tag for itself.. i just used a custom variable and said screw it 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Help! Pagination issue with Tags’ is closed to new replies.