Recently I had to make a custom WordPress query that listed post titles in alphabetical order. I started with a basic query like this. $my_query = new ...
Note: This function isn't meant to be used by plugins or themes. As explained later, there are better, more performant options to alter the main query. ...