Updating query to not conflict with WP db call