Even “omnivorous nematodes” don’t feed on all potential food sources present in the soil. The shape of the mouth parts is indicative for the type of food a given nematode is feeding on.
Bacterivory is supposed to be the ancestral feeding type, and fungal-feeding and plant-parasitic nematode probably arose from this type. Plant parasites are equipped with hollow, needle-like structures that are used to puncture plant cell walls. In by far most cases, these needle-like structures enable nematodes to take up the nutritious cell content from its host plant. A small minority of the plant-feeding nematodes may have serious economic impact in agriculture. Lesion nematodes, members of the genus Pratyenchus, belong to this group and parasitize on numerous crops.
Different nematode species are usually specialised to feeding on different groups of types of organisms and this can be seen by the different types of mouth parts which have evolved.