Readings & Meanings:
We reached the summit before dawn.
At the summit of that mountain is a big Buddha statue.
Since I helped you, please give me my allowance.
I received a gift of pickled daikon from the wife next door.
丁 is the head of a nail driven into an object. It's the phonetic marker, meaning it lends one of its pronunciations to 頂, namely, チョウ. It can also lend the idea of "straight, direct."
頁 is found in 頭, and with good reason; 頁 is a pictogram of a kneeling dude with an oversize, caricature-like head. (I mean, it has its own solar system. HEAD! PANTS! NOW!)
The Kanji Networks online etymology site really hit the nail on the head on this one. Follow this logic:
As per 丁 (Type 1 Phonetic) (straight) + 頁 head → place directly atop the head → place atop → top/summit; prop up → receive; eat (← bow and ceremoniously raise received goods above one's head; compare 承).Ref.
Caution: hiragana alert. いただきます is said at the beginnings of meals in Japan. It probably came from 頂きます. But, whatever you do, don't write the kanji in this context. Hiragana is standard and necessary here.