Q: Did early Jewish tradition involve ritualistic sex at the Temple? A: No. Ritualistic sex was never a part of Jewish tradition.
The Da Vinci Code states that "Langdon's Jewish students always looked flabbergasted when he first told them that early Jewish tradition involved ritualistic sex. In the Temple, no less...Men seeking spiritual wholeness came to the Temple to visit priestesses - or hierodules - with whom they made love and experienced the divine through physical union" (Brown, D., 2004, p. 318).
This statement couldn't possibly be more offensive to the Jewish tradition. During the biblical period of Kings, Israelite (Jewish) culture managed to deviate far from how God had originally intended for them to live as his people. The Israelites had adopted pagan practices from neighboring nations which were considered detestable in God's sight. There were in-fact, shrine (never Temple) prostitutes mentioned in 1 Kings 14:24 and what is also mentioned (and the Da Vinci Code neglects) is that the LORD was angered at his people for these acts. 1 Kings 15:11-12 reveals King Asa doing what is right in God's eyes (and Jewish culture) by expelling the shrine prostitutes.
Prostitution was not an act endorsed by God and was never part of early Jewish tradition. It was considered offensive to God and counter to how the nation of Israel was supposed behave (Deut 23:17-18). Mistakes such as this eventually led the nation of Israel to exile from the Promised Land in 2 Kings 17:7-20.
References:
Brown, D. (2004). The Da Vinci Code, Special Illustrated Edition. (p. 318). New York, NY: Doubleday.