Title: External Post Display
Last modified: August 21, 2016

---

# External Post Display

 *  [CherryDesigns](https://wordpress.org/support/users/cherrydesigns/)
 * (@cherrydesigns)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/external-post-display/)
 * Hello all,
 * Looking for some question advice here. Currently, have my posts being pulled 
   from my blog to display externally but, it’s not displaying them from the most
   recent date (July) only from (May)
 * <?php
    require(‘blog/wp-blog-header.php’); ?>
 * <?php
    $posts = get_posts(‘numberposts=5&order=ASC&orderby=post_title’); foreach(
   $posts as $post) : setup_postdata( $post ); ?> <?php the_date(); echo ““; ?> 
   <?php the_title(); ?> <?php the_excerpt(); ?> <?php endforeach; ?>

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/external-post-display/#post-5073328)
 * right now, your query is sorting by post title and limited to 5 posts –
 * is that intended?
 * review: [http://codex.wordpress.org/Template_Tags/get_posts](http://codex.wordpress.org/Template_Tags/get_posts)
 *  Thread Starter [CherryDesigns](https://wordpress.org/support/users/cherrydesigns/)
 * (@cherrydesigns)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/external-post-display/#post-5073330)
 * Yes, I intended only to have 5 posts.. but id like it in date order
 * SO i’m guessing its just adding the “‘orderby’ => ‘post_date’,” in
 *  Thread Starter [CherryDesigns](https://wordpress.org/support/users/cherrydesigns/)
 * (@cherrydesigns)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/external-post-display/#post-5073331)
 * <?php
    $posts = get_posts(‘numberposts=5&order=ASC&orderby=post_date’); foreach(
   $posts as $post) : setup_postdata( $post ); ?> <?php the_date(); echo ““; ?> 
   <?php the_title(); ?> <?php the_excerpt(); ?> <?php endforeach; ?>
 * Changed to this but no different..
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/external-post-display/#post-5073344)
 * if you want to see the latest 5 posts, change `ASC` to `DESC` or remove it as`
   DESC` is the default;
 *     ```
       $posts = get_posts('numberposts=5');
       ```
   
 *  Thread Starter [CherryDesigns](https://wordpress.org/support/users/cherrydesigns/)
 * (@cherrydesigns)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/external-post-display/#post-5073552)
 * Thank you – been working loverly for a week now.. until
 * `Warning: Cannot modify header information - headers already sent by (output 
   started at /home/cherryde/public_html/index.php:274) in /home/cherryde/public_html/
   blog/wp-content/plugins/wpclef/includes/lib/wp-session/class-wp-session.php on
   line 124`
 * Any suggestions?
 *  Thread Starter [CherryDesigns](https://wordpress.org/support/users/cherrydesigns/)
 * (@cherrydesigns)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/external-post-display/#post-5073553)
 * Fixed, disabled the clef plugin

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

The topic ‘External Post Display’ is closed to new replies.

 * 6 replies
 * 2 participants
 * Last reply from: [CherryDesigns](https://wordpress.org/support/users/cherrydesigns/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/external-post-display/#post-5073553)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
