get id from name of the post/page