Title: get_posts parameter not working ($orderby)
Last modified: August 19, 2016

---

# get_posts parameter not working ($orderby)

 *  Resolved [volleyballmaniac](https://wordpress.org/support/users/volleyballmaniac/)
 * (@volleyballmaniac)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/get_posts-parameter-not-working-orderby/)
 * I implemented **get_posts** in The Loop using the following as a reference:
    
   [http://codex.wordpress.org/Template_Tags/get_posts#Parameters](http://codex.wordpress.org/Template_Tags/get_posts#Parameters)
 * Codex states that you can orderby by **content** as follows:
    $postslist = get_posts(‘
   numberposts=10&order=ASC&**orderby=content**‘);
 * However, the orderby=content parameter does not appear to be working.
 * To test I made about 10 posts, and I put a number in each of them (no other content).
   I then used the code above, but the posts are not ordered sequentially by content.
 * I tried other orderby parameters (like title & ID) and they worked as designed,
   but the content parameter appears to be broken.
 * Can anyone shed some light on this? Perhaps a hack or fix?

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/get_posts-parameter-not-working-orderby/#post-860190)
 * If I’m reading correctly, wp-includes/query.php, in the routine at line 1254,
   doesn’t seem to allow orderby=content.
 *  Thread Starter [volleyballmaniac](https://wordpress.org/support/users/volleyballmaniac/)
 * (@volleyballmaniac)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/get_posts-parameter-not-working-orderby/#post-860359)
 * Thanks for your response Michael.
 * I appreciate it.

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

The topic ‘get_posts parameter not working ($orderby)’ is closed to new replies.

## Tags

 * [get_posts](https://wordpress.org/support/topic-tag/get_posts/)
 * [orderby](https://wordpress.org/support/topic-tag/orderby/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [volleyballmaniac](https://wordpress.org/support/users/volleyballmaniac/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/get_posts-parameter-not-working-orderby/#post-860359)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
