• Does anyone know how to get the query loop below to dynamically insert the current page’s name inplace of the about?

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

    ___________________________

    <?php the_title(); ?>

    would do it, but I can’t do

    <?php query_posts('pagename=<?php the_title(); ?>'); ?>

    Any suggestions are welcome. Is there anyway to generate the result from a call and have the result automatically inserted into another php call?

    By the way I can’t use the regular loop to call the page as I’m already using it on the same page. And all the multi-loop solutions that I have looked at don’t seem to address multi-loops and loops for page on the same… umm page.

The topic ‘query_posts pagename=about’ is closed to new replies.