updated SQL calls to new WP structure