Title: Featured list
Last modified: August 20, 2016

---

# Featured list

 *  Resolved [Ann-Sophie](https://wordpress.org/support/users/ann-sophie/)
 * (@ann-sophie)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/featured-list/)
 * Hi,
 * please take a look at this [page](http://www.mj-roofs.be/wordpress/diensten/).
   
   It’s a slideshow listing every page under “Diensten” + a featured image. I’d 
   like to sort this service according to their ID. (35,37,39,41,43). How can I 
   do this? This is my code: <?php
 *     ```
       $mypages = get_posts('include=35,37,39,41,43&sort_column=ID&post_type=page');
                   ?>
   
               <div id="feature_list">
   
                   <ul id="tabs">
   
                           <?php foreach($mypages as $mypage) : setup_postdata($mypage); ?>
   
                           <li>
                           	<a href="javascript:;">
                           	<h3><?php echo $mypage->post_title; ?></h3>
                           </a>
                       </li>
   
                                   <?php endforeach; ?>
   
                   </ul>
   
                   <ul id="output">
   
                       <?php foreach($mypages as $mypage) : setup_postdata($mypage); ?>
   
                           <li>
                                   <?php
                               if ( has_post_thumbnail($mypage->ID) ) { // check if the post has a Post Thumbnail assigned to it.
                                           echo get_the_post_thumbnail( $mypage->ID, 'large');
                                           }
                                           ?>
                               <a href="<?php echo get_permalink($mypage->ID); ?>" title="<?php echo esc_attr(strip_tags(get_the_title($mypage->ID))) ?>">Meer informatie »</a>
                                           </li>
   
                       <?php endforeach; ?>
   
                           </ul>
   
               </div><!-- end feature_list -->
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/featured-list/#post-2181949)
 * Here’s one example from yesterday that you could learn from:
    [http://wordpress.org/support/topic/wp_query-ordered-by-post-id-but-not-date?replies=7#post-2215361](http://wordpress.org/support/topic/wp_query-ordered-by-post-id-but-not-date?replies=7#post-2215361)
 * See also [http://codex.wordpress.org/Class_Reference/WP_Query](http://codex.wordpress.org/Class_Reference/WP_Query)
 *  Thread Starter [Ann-Sophie](https://wordpress.org/support/users/ann-sophie/)
 * (@ann-sophie)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/featured-list/#post-2181953)
 * Hey,
 * I tried what you posted in the other topic, but it doesn’t work. The order is
   still the other way round… My code is now this:
 *     ```
       <?php
                   $mypages = get_posts('include=35,37,39,41,43&orderby=ID&post_type=page');
                   ?>
       ```
   
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/featured-list/#post-2181959)
 * That looks okay, but you probably need `order=ASC`
 *  Thread Starter [Ann-Sophie](https://wordpress.org/support/users/ann-sophie/)
 * (@ann-sophie)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/featured-list/#post-2181973)
 * Yes idd that solves the problem! Thanks a lot!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Featured list’ is closed to new replies.

 * 4 replies
 * 2 participants
 * Last reply from: [Ann-Sophie](https://wordpress.org/support/users/ann-sophie/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/featured-list/#post-2181973)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
