Ex officio has 4 different meanings across 2 categories:
Adjective · Adverb
by virtue of an office or position
"the head of the department serves as an ex officio member of the board"
By virtue of the office that originated it, or of the title held.
by virtue of position
"the president sat on the committee ex officio"