Let us name the diagram.
From this right triangle,
The opposite side is 18 inches.
The adjacent side is 2 feet
That is,

To find the hypotenuse side(x):
Using the pythagoras theorem,

Hence, the total height of the post is, x+24 inches
That is,
30+24=54 inches.
Therefore, the answer is 54 inches (or) 4.5 feet.