Support » How-To and Troubleshooting » help with WP_Query orderby

help with WP_Query orderby

  • Hi,

    I am trying to query a custom post type using WP_Query. It works fine, except for the orderby parameter. No matter what I set it to, I get the same order. Here’s some code:

    $quilts = new WP_Query( 'post_type=profiles&post_status=publish&orderby=rand' );

    Again, I can change the orderby and the order stays the same.

    Any idea what might be causing this?


Viewing 1 replies (of 1 total)
  • Maybe part of the problem is that I am actually doing this outside of WordPress. My PHP script has this to include WordPress:


    Everything else works fine, except for the sorting. Weird.

Viewing 1 replies (of 1 total)
  • The topic ‘help with WP_Query orderby’ is closed to new replies.