Believe it or not, in World War II, displacing machine gun nests was important.
Snipers are less important now because the modern army is more mobile as a result of being outfitted almost entirely with assault rifles. Also, trenches are gone, so far less static targets to plink away at with your rangefinder, spotter, sniper system, etc.
Snipers aren't all that much use in urban combat, either, due to the fact that their combat effectiveness versus other infantry types is maximized over 500m, which is difficult to obtain in a modern urban jungle. At the very least even if you obtain those distances the tunnel vision would kill you and open you up to serious flank maneuvers within a short amount of time.
But in my view it's unquestionable the designated marksman still has significant value. If you will, in the urban environment the role of sniper is more suitably adapted to with the designated marksman position.