• OK, I’m having some trouble getting a conditional to work at the top of one of my pages.

    My code looks like this:

    <?php if ( is_home() ) { ?>
    	<?php query_posts('showposts=10&offset=1'); ?>
    <?php } else { ?>
    	<?php query_posts('showposts=10'); ?>
    <?php } ?>

    And no matter what, it acts as if it’s the homepage. Anyone know why?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter forgetthebull

    (@forgetthebull)

    Sorry, but I need to bump! I can’t find anything like this.. If I still get no replies, I’ll refrain from re-bumping.

    Thanks.

    I’m not sure but I think the 2 query_posts do the same. Offset = 1 displays the most recent (1) I’ve read in the codex. I don’t see how this would be different from leaving it out. Did I misunderstood something?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    No, offset causes it to skip over single posts. So an offset of 1 should skip the first post and then display the next 10 after it, in this case.

    Is that what it’s doing on all your pages, ForgetTheBull?

    Thread Starter forgetthebull

    (@forgetthebull)

    no, i don’t want the offset on some of my pages. Though, not I notice that no conditionals are working for me!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Conditionals Won’t Work!’ is closed to new replies.