refactor helper for seo detection and add categories in front-end