Plantinga's evolutionary argument against naturalism has not proved particularly convincing to those who have a wholly non-supernaturalist world view and who accept Darwinian evolution as true. The main problem that has been pointed out with it, is that being able to accurately comprehend aspects of one's environment has fundamental evolutionary function. It makes sense, therefore, to ask whether there is a class of beliefs whose function is not connected to their truth. As I will argue, this is the case for beliefs whose function is to motivate cooperation rather than to direct action. Given that there is now extensive evidence that historically the function of religions has been to allow the existence of large-scale societies by motivating cooperation beyond small family groups, it appears that religious beliefs are a prime example of ideological beliefs. Therefore, Plantinga's argument, in so far as it works, works primarily for religious beliefs.