Right
寺 supplies the sound (sì → shī, a regular alternation in the same phonetic family).
寺 originally meant 'court office' before its Buddhist-temple sense developed. Phonetic family:
时 shí (time),
持 chí (hold),
等 děng (wait),
特 tè (special) — all built on
寺.