The Soviets played with this as well in WWII, with at least two destroyers being fitted with side-mounted 12" guns (I believe salvaged from the sunken Marat, though I'm not 100% sure on the source) for bombarding German shore positions. Keep the starboard side pointed at the beach, make very limited horizontal adjustments (major ones relied on turning the whole ship), and put heavy shells down on the beach outside the range of return fire. Neat idea, and a better use of old pre-Revolution DDs than just sending them in close to the beach to get savaged by shore batteries or Z-boats.
I've seen a reference to a similar idea being considered for old Wickes and Clemson-class DDs early in WWII for the Pacific island-invasion campaigns, but by the time anyone really worked on solid plans for it the Pearl Harbor ships were coming back into service, and provided the needed fire support instead. (This is also the reason the idea to salvage the aft half of the Arizona to turn into a shore bombardment ship, with a new front end, came to nothing.) A similar idea to convert Omaha-class CLs into jury-rigged Atlanta-style CLAAs, with 5"38s and quad-40mms replacing the 6-inch guns, also died off due to new-construction ships coming into service and making the Omahas- AA ships or standard- completely irrelevant for further use.