Display children of current page in summary list
-
On the current website I am working on, there are a couple of main pages, with several child pages each. When the user is viewing one of the main pages, I am using the following code to list the child pages, a thumbnail for each child, and a short description.
<?php $pages = get_pages('child_of='.$post->ID.'&sort_column=post_title'); $count = 0; foreach($pages as $page) { ?> <div class="indi"> <img src="<?php $thumbpic = get_post_meta($page->ID, "Thumbnail", true);echo "".$thumbpic.""; ?>" class="thumbpic"/> <div class="story"> <h4><a href="<?php echo get_page_link($page->ID) ?>"><?php echo $page->post_title ?></a></h4> <p><?php $subsum = get_post_meta($page->ID, "Summary", true);echo "".$subsum.""; ?></p> </div><div style="clear:both;" ></div></div> <?php } ?>
The code works. Only one problem: the children are listed alphabetically. Can anyone tell me how to modify the above code to list the children in order of priority?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Display children of current page in summary list’ is closed to new replies.