Post Query not working after updating to 4.1

I formed this query based on this answer. I would appear this is no longer the way to do it… I reformatted the query to look like this: query_posts( array( ‘post_type’ => ‘events’, ‘showposts’ => -1, ‘order’ => ‘ASC’, ‘orderby’ => ‘meta_value_num’, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘_ecmb_datetime’, ‘value’ => strtotime(‘today … Read more

Display Users from two roles in one list

Since the roles for a user are stored in (dbprefix)_capabilities, I’d try grabbing the database prefix and then using it to grab people with the right capabilities (caps are in a serialized array): global $wpdb; $prefix = $wpdb->prefix; $meta_name = “{$prefix}capabilities”; ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => “{$meta_name}” ‘value’ => ‘program_manager’, ‘compare’ … Read more

Filter query based on date in custom field

You can use this format of meta_query, although you’d have to change the format of all of your existing expiry-date entries. ‘meta_query’ => array( ‘key’ => ‘expiry-date’, ‘value’ => array($today, $UserInputExpiry), ‘compare’ => ‘BETWEEN’, ‘type’ => ‘DATE’ ) The second date in the array is the later date and both $today and $UserInputExpiry should be … Read more

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