Support » Fixing WordPress » Multi-loop ? using two loops ? calling specific page outside the loop

  • Resolved krembo99


    Hello all.
    I am designing a new and unique template ,horizontal, mainly for portfolios.
    in my template I use table tags (the only way i could though of )
    My problem is as followed :
    I need the FIRST table cullom to get only 1 specific post (about page) where all the others to get all the posts (normal loop)
    Normally the template works great, and fils the table cells exactly with the info i need, but when I try to fill the first collum with the “about” page, the loop stops working ,showing only the “about” entry twice.

    to put the “about” page on the first column i have used this inside a tr tag:

    <?php query_posts('pagename=about'); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php the_content(); ?>
    <?php endwhile; ?>
    <?php endif; ?>

    after which I have tried to put the other classic loop
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>


    <?php endwhile; else: ?>
    <p><?php _e(‘Sorry, there aren\’t any posts that match what you requested.’); ?></p>
    <?php endif; ?>

    and so on, to fill the other cells.

    Is there another way to call a specific page to be used outside the loop ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • ok..
    I have solved it myself ..
    Just had to add anther query in front of the second loop


    well.. at least this post might help someone else 🙂

    Thanks krembo99!! Im working on a theme too (my first theme, for my own site) but started learning CSS only two weeks ago and have little knowledge about PHP. I also use two loops to display featured posts and normal posts, and this does help me out!! Thank you very much! & drop by my site at if you like. The theme is still on process, probably done before X’max.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multi-loop ? using two loops ? calling specific page outside the loop’ is closed to new replies.