Multiple loops and IF
-
For some reason after I started to use multiple loops (one in sidebar and one on index page) the IF construction is not working any more.
Loop 1 (sidebar):
<?php query_posts(“cat=6&showposts=10”); ?>
<?php while (have_posts()) : the_post(); ?>
<b>” rel=”bookmark”><?php the_title(); ?></b> (<?php the_time(‘F j, Y’); ?>)
<?php endwhile; ?>Loop 2 (index):
<?php rewind_posts(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<!– Some code //–>
<?php endwhile; ?>And finally IF expression in sidebar:
<?php if ( is_home() ) {Some statement 1} else {Some statement 2} ?>
Thanks for help in advance!!!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Multiple loops and IF’ is closed to new replies.