Previously, it has been shown that the direct correlation function for a Lennard–Jones fluid could be modeled by a sum of that for hard-spheres, a mean-field tail, and a simple linear correction in the core region constructed so as to reproduce the (known) bulk equation of state of the fluid [Lutsko, J. Chem. Phys. 127, 054701 (2007)]. Here, this model is combined with ideas from the fundamental measure theory to construct a density functional theory for the free energy. The theory is shown to accurately describe a range of inhomogeneous conditions including the liquid vapor interface, the fluid in contact with a hard wall, and a fluid confined in a slit pore. The theory gives quantitatively accurate predictions for the surface tension, including its dependence on the potential cutoff. It also obeys two important exact conditions: That relating the direct correlation function to the functional derivative of the free energy with respect to density and the wall theorem.