Problem with get_posts, tax_query and counting the number of posts

Try this again removing operator and relation arguments as follows: here is a useful link http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/ $products = get_posts(array( ‘post_type’ => ‘products’, ‘posts_per_page’ => -1, ‘post_status’ => ‘publish’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘collection’, ‘field’ => ‘slug’, ‘terms’ => array($current_collection) ), array( ‘taxonomy’ => ‘type’, ‘field’ => ‘slug’, ‘terms’ => array($current_type) ), array( ‘taxonomy’ … Read more

Specify number of posts in my ‘tax_query’

Never user query_posts, under any circumstances. Use WP_Query instead, which is how query_posts works internally, but without the trickery and downsides. You’ll also find that the WP_Query documentation gives you explanations for every parameter, including what you are trying to do: posts_per_page (int) – number of post to show per page (available with Version 2.1, … Read more

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