Another example of shotguns used in the First World War was an American weapon, the 1897 trench gun, which was a Winchester model 1897 with a shortened barrel and fitted for a bayonet. The interesting bit about this gun was that it fired every time the pump action was engaged while the trigger was depressed. As such troops armed with this weapon only had to hold down the trigger and pump the action of the shotgun as fast as they could. Combine this with an ammo capacity of 6 shells containing 00 buckshot and the 1897 trench was brutally effective in the close confines of trenches, even to the point where the German government issued a formal protest, claiming that its use violated the accords of the 1907 Hague convention. (Ironic considering other weapons such as poison gas were way worse).
There was some urban warfare when the Germans captured Liege in 1914, and although not quite extensive enough to be considered 'urban' warfare, towns and villages in France were the scene of fierce fighting, most notably Martinpuich and Thiepval during the Somme Campaign in 1916. Belgrade was also the scene of some urban fighting in 1915, when the city was taken by German and Austro-Hungarian troops.
There are some anecdotes about the use of double-barrel shotguns by British and commonwealth forces at Gallipoli, but for the most part close-quarters weaponry was most diverse on the Western Front, where trench raiders used clubs, knives, coshes, grenades, and various other CQB 'implements' to attack enemy positions, primarily for reconnaissance purposes.