Move ajax endpoint for post types to front end (this wouldnt be necessary if we had WP-API)