moving query field check outside of content (so that initial search page is empty)