If contributions to a church fund are earmarked by the donor for a particular individual, they are treated, in effect, as being gifts to the designated individual and are not deductible. Therefore, placing a check marked "For Pastor John Doe" in the donation box would not result in a charitable gift that was deductible. However, if the church accepted the check, then it would be obligated to return the check or use it as it was intended. Now, let's suppose a church member wrote a check and earmarked it for use to buy new hymn books. Clearly, this is not a donation to an individual and would benefit the church. What then?
In general, earmarked gifts are not deductible. However, it is possible to split a few hairs here and arrive at a different result. If the donor simply mentions the particular purpose, but places the donation in an envelope clearly marked with language indicating that the church retains full control over the use of the funds and discretion to spend them in any way beneficial to the church, then the donor is merely "suggesting" a use, and the church may or may not choose to use the funds in the manner suggested. The key is that the church maintains full control over the funds and may exercise its unfettered discretion in how best to use them to benefit the church.