• Resolved Ann-Sophie

    (@ann-sophie)


    Hi,

    please take a look at this page.
    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)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Featured list’ is closed to new replies.