Ants are indirectly attracted to the processes associated with creating plant food.
While ants don't directly consume most commercial "plant food" fertilizers, they are attracted to the organic materials that contribute to the breakdown and creation of compost, which in turn acts as a natural plant fertilizer. The reference text explains how a compost pile, in breaking down plant material into fertilizer, "also attracts ants by sending sweet smells of items like banana peels, melon rinds, etc. into the air." Therefore, ants are attracted to the process of making certain plant foods rather than directly consuming the final product.