Every “professional” photography book I’ve read makes it gospel that you have to shoot landscapes at f/22, in order to ensure that the foreground and background is in focus. Special thanks to these guys for teaching millions of photographers to create blurry photos. Lens Diffraction, and an explanation as to why shooting at f/22 (and higher than around f/11) is likely giving you soft photos, when sharpness is what you’re trying to achieve.
Check out http://fstoppers.com/what-is-lens-diffraction-on-dslr-camera for a more in-depth explanation. Most of my shots are around f/5.6 – f/11 these days, and have turned out much sharper, even with a foreground. Most lenses are at their sharpest only two or three stops down from their largest aperture.