add beforeFilter for theme