Fix bug of not passing current page ID into plugin
Added config and set up sql