query_posts and custom taxonomy posts order

If you are trying to order your posts by taxonomy terms, it’s not technically possible in one query (since multiple terms can belong to multiple posts – which means that WordPress cannot support ‘orderby’ for taxonomies or terms because there are potentially more than one).

Your solution would be:

  1. Fetch a list of your (sub)terms and loop through them.
  2. In each term loop, run query_posts() to fetch only posts attached to the current term.
  3. In each term loop (after the query), create your content-output loop to display your posts.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)