• What I’m trying to do:
    I want a list of links to posts from category 82 to show up after content of page 91 is rendered.

    IT WORKS WONDERFULLY EXCEPT the fact that each post has to be rendered after links. Something to do with the_post() inside The Loop.
    So, there is a better way to do this, right? But what is it!

    This is the code INSIDE “The Loop”

    <!-- STANDARD PAGE HEADER -->
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
        <div class="entry">
            <!-- PAGE CONTENT -->
            <?php the_content(); ?>
            <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
            <?php edit_post_link('Edit', '<p>', '</p>'); ?>
    
            <!-- PAY ATTENTION TO THESE LINES!!! -->
            <?php if($post->ID == 91){
                query_posts('cat=82&showposts=10&orderby=date&order=DEC');
                while (have_posts()) : the_post(); ?>
                    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><br />
                <?php endwhile; ?> <br /><br />
            <?php } ?> <br /><br />
        </div>
    
        <!-- COMMENT BOX -->
        <div class="comments-template">
            <?php comments_template(); ?>
        </div>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Dynamic list of links to posts of a given category on a page’ is closed to new replies.