In the formula for the volume of a pyramid, the height h, is the distance measured along one faces of the pyramid to the base.

Is that true?

No. The height is the distance from the apex straight down to the base.

http://www.mathsisfun.com/geometry/pyramids.html