condition applies on 1st search, not paginations

also moved homepage/about links to base template