Support » How-To and Troubleshooting » [Resolved] get_posts parameter not working ($orderby)

[Resolved] get_posts parameter not working ($orderby)

  • volleyballmaniac


    I implemented get_posts in The Loop using the following as a reference:

    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


    If I’m reading correctly, wp-includes/query.php, in the routine at line 1254, doesn’t seem to allow orderby=content.



    Thanks for your response Michael.

    I appreciate it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] get_posts parameter not working ($orderby)’ is closed to new replies.