Page order using the loop
-
Hi – I’ve made a page template that loops all child pages with a thumbnail, title and excerpt.
What I’d like to be able to do is to change the sort order
Here’s the loop:
<?php query_posts('&order=menu_order&post_type=page&post_parent='.$parent); while (have_posts()) : the_post(); ?> <div <?php post_class('news-block') ?> id="post-<?php the_ID(); ?>"> <div class="thumbnail"> <a href="<?php the_permalink(); ?>" class="news-block-img"> <?php the_post_thumbnail(); ?></a> </div> <div class="news-block-text"> <h3><a href="<?php the_permalink() ?>" class="news-block-title" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <div class="news-block-summary"><?php the_excerpt(); ?></div> </div><!-- end .news-block-text /--> </div><!-- end .news-block /--> <?php endwhile; ?>
Unfortunately
&order=menu_order
doesn’t list the pages in the order I’ve specified (though it does list them in the correct order in the navigation)I’ve tried using a page order plugin as well but that doesn’t work either.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Page order using the loop’ is closed to new replies.