It seems like stupid bug, but how can i order by title? It anyways orders by date! I'm using:
query_posts( array( 'post_type' => 'page', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC' ) );
I want to use this in function as SHORTCODE. What i'm trying to achieve is to create site map / index of all entries in alphabetic order. Also i'm using newest WP.
var_dump()
orprint_r()
of the generated query? Also, a bit of context for this code would be helpful. Are you modifying the main loop query, or running a secondary loop?