$wpdb query a post type within a specific taxonomy term while ordering posts by custom meta value?

You have a typo in orderby, and meta_value_num is only used as an orderby value, try this: $args = array( ‘post_type’ => ‘event’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘locations’, ‘field’ => ‘id’, ‘terms’ => $location // location term id ) ), ‘meta_key’ => ‘event_date’, // this meta field stores event date in yymmdd format … Read more

meta_query keys and sticky posts

get_posts() is a rather generic wrapper for retrieving set of posts and just that. As such it purposely unmakes some of the arguments typical for loops. Specifically it ignore stickies: $r[‘ignore_sticky_posts’] = true; So if you want more loop-like behavior you should be using instance of WP_Query object instead.

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