• Hi guys,

    I using ‘home.php’ to be as main page for the wordpress. In the ‘home.php’, I use 2 type of loops which I could summary it in the following:

    <div class="ads">
    <?php query_posts('page_id=94'); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php the_content(); ?>
    <?php endwhile; ?>
    <?php endif; ?>
    </div>
    
    <div class="news">
    
    <?php query_posts('cat=1,3&showposts=2'); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div id="post-<?php the_ID(); ?>">
    
    <div class="header-news">
    
    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
    <?php the_title(); ?>
    </a>
    </div>
    
    <div class="date-news">
    <?php the_time('j  F  Y') ?>
    </div>
    
    <div class="body-news">
    
    <?php the_content('<span style="float: left;"><strong>Read more ...</strong></span>'); ?> 
    
    </div>
    
    </div>
    <?php endwhile; ?>
    <?php endif; ?>
    </div>

    and the loops working fine Except one thing !!

    The “more” tag didn’t work in the second loop !! while if I “delete” the first loop, the “more” tag work fine in the second loop ! So according to this, the first loop affecting the second loop !

    So, any one here can help me in fixing the codes above so I could run both loops with no problem in “more” tag at second loop!

    Regards,
    MARWAN

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

The topic ‘The first loop affecting the second loop in ‘more’ tag’ is closed to new replies.