How to enable or disable search in the header?