switch to wp-api