Added routing for pages vs. posts.
Page detal page.
Changed for wp-api.