Here are the verses of relevance to this question in the BHS Hebrew text:
לֹא־תִהְיֶ֥ה קְדֵשָׁ֖ה מִבְּנ֣וֹת יִשְׂרָאֵ֑ל וְלֹֽא־יִהְיֶ֥ה קָדֵ֖שׁ
מִבְּנֵ֥י יִשְׂרָאֵל׃
לֹא־תָבִיא֩ אֶתְנַ֨ן זוֹנָ֜ה וּמְחִ֣יר כֶּ֗לֶב בֵּ֛ית יְהוָ֥ה אֱלֹהֶ֖יךָ לְכָל־נֶ֑דֶר כִּ֧י תוֹעֲבַ֛ת יְהוָ֥ה אֱלֹהֶ֖יךָ
גַּם־שְׁנֵיהֶֽם׃
(Deuteronomy 23:18-19, which corresponds to vv. 17-18 in the English translation used in
the question)1
Here is a good translation of these verses:
None of the daughters of Israel shall be a cult prostitute, and
none of the sons of Israel shall be a cult prostitute.
You shall not bring the fee of a prostitute or the wages of a
dog into the house of the LORD your God in payment for any vow, for both of these are an abomination to the LORD your God.
(Deuteronomy 23:17–18, ESV, emphasis mine)
For the sake of simplicity (because of the verse numbering difference between the Hebrew and English text), I will refer to these as the first and second sentences, respectively (verse numbering is an anachronistic division of the text anyways).
The first sentence uses קְדֵשָׁ֖ה (kedeshah, singular feminine form of the noun) and קָדֵ֖שׁ (kedesh, singular masculine form of the same noun) for each respective use translated as "cult prostitute" above. This word refers to a "consecrated, cult prostitute."2 The NET translators elaborate:
The Hebrew term translated “sacred prostitute” here (קְדֵשָׁה
[qédeshah], from קַדֵשׁ [qadesh, “holy”]; cf. NIV “shrine
prostitute”; NASB “cult prostitute”; NRSV, TEV, NLT “temple
prostitute”) refers to the pagan fertility cults that employed female
and male prostitutes in various rituals designed to evoke agricultural
and even human fecundity (cf. Gen 38:21–22; 1 Kgs 14:24; 15:12; 22:47;
2 Kgs 23:7; Hos 4:14). The Hebrew term for a regular, noncultic (i.e.,
“secular”) female prostitute is זוֹנָה (zonah).3
The second sentence uses זוֹנָ֜ה (zonah, feminine singular4) in the first instance which is correctly translated plainly as a (secular) "prostitute,"5 and כֶּ֗לֶב (kelev, singular noun) in the second instance, translated as "dog" by the ESV. This last word translated as "dog" is a colloquial Hebrew term for a secular male prostitute (i.e. a sodomite) and is intended as a disparaging epithet (it may also refer to pederasty).6
The IVP Bible Background Commentary explains:
One can distinguish between several different categories [of cultic prostitution]. In “sacred”
prostitution, the proceeds go to the temple. In “cultic” prostitution,
the intent is to insure fertility through sexual ritual. We must also
differentiate between occasional sacred/cultic prostitution (as in Gen
38) and professional sacred/cultic prostitution (as in 2 Kings 23:7).
The evidence for cultic prostitution in ancient Israel or elsewhere in
the ancient Near East is not conclusive. Canaanite texts list
prostitutes among the temple personnel, and Akkadian literature
attests those who were dedicated for life to serve the temple in this
way. Although the Hebrew word used here is related to an Akkadian word
for prostitute, this does not prove that any religious ritual or
cultic practice is involved. It is quite possible for prostitutes to
be employed by temples as a means of raising funds without their
having any official status as priestesses. Furthermore, since women
often did not have personal assets, sometimes the only way of earning
money by which to pay a vow appeared to be prostitution. The
injunction against bringing the wages of a prostitute to the temple
may, however, be a reaction against practices like that of the Ishtar
temple servants in the Neo-Babylonian period, who hired out female
members of their community as prostitutes. Their wages would have been
placed in the temple treasury. All of this demonstrates the existence
of sacred prostitution, both occasional and professional, in Israel
and the ancient Near East. But the existence of cultic prostitution on
either level is more difficult to prove. Cultic prostitution is not
easily confirmed in Mesopotamia, unless one includes the annual sacred
marriage ritual. But it is hard to imagine that prostitutes serving at
the temple of Ishtar (who personified sexual force) were not viewed as
playing a sacred role in the fertility cult.
The translation “male
prostitute” in Deuteronomy 23:18 is based on the use of the Hebrew
word that usually means “dog.” In the fourth-century B.C. Kition
inscription, this term is used to describe a group that receives
temple rations. It is possible, but not certain, that this refers to a
temple official or priest. Recent study has shown that, at least by
the Persian period (sixth-fifth century), dogs had some significant
role in Phoenician cultic practice. Kalbu (dog) has a more positive
meaning of “faithful one,” as can be seen in its use in personal names
(like the biblical Caleb). (See Ex 34:16.)7
Strengthening this translation choice, there may also be a play on words between כֶּ֗לֶב (kelev, dog) in the second sentence and תַשִּׁ֣יךְ (tsasik, from נשׁך / nasak) in the ensuing sentence (not shown in this answer, v. 19 in English translations), which means 'lend on interest' but is from the root word (identical) meaning 'bite.' So after instructing that the 'dog' shouldn't bring his wages into the temple to pay for vows, the reader is told he shouldn't 'bite' (charge interest to) his fellow Israelite in this following context (the Hebrew Bible is great for these sorts of visual word-plays—although this may be reading too much into the passage—it could just be an interesting coincidence that these words were written in close proximity).
So in conclusion, to clearly answer the questions:
Does the word used for prostitute mean 'temple prostitute' or prostitute in general?
The historical evidence is inconclusive whether 'temple prostitution' is in mind. Both 'cultic' and 'secular' prostitution are addressed in this context, however, so the specific category of prostitution does not seem to be as important in this context as the practice itself. However, it is notable that both categories are specifically addressed.
Does God detest prostitutes (personally) or does the verse mean that He detests prostitution?
When we read the immediate context it becomes clear that God disapproves of both secular and cultic prostitution. But does he consider the prostitutes themselves to be abhorrent? Solely based on this context, I don't think so. The last part of the second sentence says that "both (שְׁנֵיהֶֽם) of these are abhorrent to the LORD your God." 'Both of these' could refer to two possible referent pairs:
- The fee of a prostitute (אֶתְנַ֨ן 8) and the wages (מְחִ֣יר) of a dog (כֶּ֗לֶב). This is the immediate preceding referent pair, which would mean that God abhors the actual fee/wages of prostitutes being used to pay for the fulfillment of a vow in the temple. This is the most likely (plain literal sense) meaning intended by the author.
- The above referent pair and cultic prostitution among the Israelites. This would be taking each preceding phrase as referents in the pair. This is the weaker choice, but it is not impossible.
If the first referent pair (most likely), then what God abhors is not the prostitutes themselves (based solely on this passage), but the actual practice of a fee/wages of prostitutes being used to pay for the fulfillment of a vow in the temple.
If the second referent pair (least likely, but possible), then what God abhors is the above practice and the existence of Israelite cultic prostitutes. It seems moreso that God abhors the practice itself, the prostitutes themselves are not a clear referent in this text. Either way, this text alone would not justify the statement that God detests/abhors prostitutes personally.
It is clear from this text and its context that God detests the practice of prostitution itself and consequently he also abhors using payment/gifts received from the practice for the fulfillment of vows (presumably vows of gratitude for God's provision, but possibly other cultic/religious forms of vows).
1 Biblia Hebraica Stuttgartensia: With Werkgroep Informatica, Vrije Universiteit Morphology; Bible. O.T. Hebrew. Werkgroep Informatica, Vrije Universiteit. (Logos Bible Software, 2006), Dt. 23:18–19. Note the verse shift in the BHS from the common English verse numbering.
2 Ludwig Koehler et al., The Hebrew and Aramaic Lexicon of the Old Testament (HALOT) (Leiden; New York: E.J. Brill, 1999), 1075. This word is not necessarily the same as 'temple prostitute,' which carries a historical meaning that may not be intended here. See the quote from footnote #7 for more information.
3 Biblical Studies Press, The NET Bible First Edition Notes (Biblical Studies Press, 2006), Dt 23:17.
4 Whether this is a substantival participle or an absolute noun in this context is irrelevant to its meaning here.
5 HALOT, 275. This word means a "woman occasionally or professionally committing fornication, prostitute, harlot." This word does not refer to a sacred/temple prostitute.
6 Ibid., 476. The word also can refer to a "faithful servant," which is clearly not the intended meaning in this context.
7 Victor Harold Matthews, Mark W. Chavalas, and John H. Walton, The IVP Bible Background Commentary: Old Testament, electronic ed. (Downers Grove, IL: InterVarsity Press, 2000), Dt 23:18–20.
8 HALOT, 103. This word primarily means 'gift' but refers to a 'harlot's reward' when used in this context. Interestingly, the female prostitute's earnings are not viewed as 'payment' but rather as a 'gift' or 'reward' for her sexual services, while a male prostitute receives 'wages.'