WW1 did have some pretty bad generals, but the terrible fact was that at that particular time the weapons of defense totally overwhelmed the chances of an offense being successful. Until the tank came along, there really was no other way to attack except have a huge artillery barrage and then a mass infrantry assault to try and overwhelm the defense. Where I fault the generals, and the political leaders as well, is that after 1915 at the latest there should have been no big offenses on either side. It had already been shown that without a massive number advantage (which was impossible to get with the relatively short front, allowing either side to man all works well and have reinforcements nearby) no attack would do more then gain a few miles at most. The Allied blockade on Germany did gradually starve them, so on the allied side there was no real reason to attack. Germany had reason to attack. The allied political leaders, Clemencaue and Lloyd George, were a real pair of SOBs who cared nothing about killing millions of their own soldiers.
Unlike WW2, where there was a clear and absolute need to defeat Hitler, there was no good reason for WW1 except the rivalry between the UK and Germany, and the byzantine mutual defense treaties that allowed the assasination of a minor Balkan prince to escalate to the most terrible war in human history up to that point.