Trench warfare in WW1 on the Western Front was a static business. In order to make an attack worthwhile, there needs to be a breakthrough. This needs the aforementioned combined arms warfare - heavy artillery continual suppressing fire against enemy artillery positions,communications and transport; medium howitzers and guns providing a creeping barrage, and field guns close up. Utilize tanks in significant numbers, in combination with enough fast moving sturmtruppen and large amounts of conventional infantry.
Utilize air support, particularly in regards to reconnaissance. Open up a breach and exploit it with the cavalry and reserves.
All these came together, along with the necessary command mindset and spirit of aggression, in 1918 for the Allies. Until then, the lessons still need to be digested, the technology advanced, and the manpower mustered. Millions of Yanks help a bit.