Added check if the header menu exists if not then just do nothing
Fixed the search form search id and replaced with a  class
Set flex slider to only output if there are posts or slides