• Resolved thirdeyetc

    (@thirdeyetc)


    Greetings,

    I have placed the following code in my loop on both the index and single templates.

    <?php the_tags('Tagged with: ',' &bull; ','<br />'); ?>

    It works fine for the single.php file but not for my index file.

    I am wondering if this is due to the modified loop I am using to eliminate certain categories.

    <?php if (have_posts()) : ?>
    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $recent = new WP_Query("cat=-3,-4,-9,-8,-74,-93&showposts=5&paged=$page");
    while($recent->have_posts()) : $recent->the_post();?>

    Any help would be appreciated.

    Theme: Heavily Modified Cutline 1.1 three column split
    Wordpress: 2.3.1
    Site: http://www.thirdeyemag.com

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter thirdeyetc

    (@thirdeyetc)

    If this has been addressed a link would be appreciated.. from what I know what I’m doing should be working…

    Thread Starter thirdeyetc

    (@thirdeyetc)

    Well, I am here to report that I switched back to the unmodified loop, and indeed the categories appear, so this is most definitely the issue.

    I hope someone comes up with a work around for this, because I really don’t want the excluded categories appearing on my front page, and I like to minimalze the amount of plug-ins I am using.

    Try changing this:

    $recent = new WP_Query("cat=-3,-4,-9,-8,-74,-93&showposts=5&paged=$page");
    while($recent->have_posts()) : $recent->the_post(); ?>

    to:

    query_posts("cat=-3,-4,-9,-8,-74,-93&showposts=5&paged=$page");
    while(have_posts()) : the_post(); ?>

    It is interesting the WP_Query() class is doing this, though. Seems a bug.

    Thread Starter thirdeyetc

    (@thirdeyetc)

    Haha… well I finally grew impatient and ditched my hacked custom query in favor of the advanced category excluder plug in.

    But I will take a note of this just in case I need to go back to the old method. The advanced category excluder also fixed the problem I was having with the custom query creating a bunch of blank pages in the pagination too…

    (I should have said ‘indeed the TAGS appear’ above, sorry for the confusion)

    Thread Starter thirdeyetc

    (@thirdeyetc)

    OK, I’m going to go ahead an implement your suggestion because I just noticed the UCE is removing posts from my recent entries sidebar which I don’t want. I will get back with what I learn…

    Thread Starter thirdeyetc

    (@thirdeyetc)

    Alright, Indeed your solution allows me to fix both problems as well without resorting to the plug in.

    This also fixes the empty pages problem.

    Thanks so much! Kafkaesqui is the bomb!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Modified Loop equals broken the_tags function’ is closed to new replies.