Is the word "post" used in the same way in the following two sentences?

He occupied a post in the treasury.

A pair of posts marked the goal.
different meanings