The tanh method is used to find travelling wave solutions of various nonlinear wave equations. In this paper, the extended tanh function method is further improved by picking up new solutions of an auxiliary ordinary differential equation and presenting a general ansätz. The BBM equation and the variant Boussinesq equation are chosen to illustrate the method. As a result, abundant new solitary wave solutions and periodic solutions are obtained.