SPECIAL occasions of every sort feature food and funerals are no exception. In many cultures, there are foods that are customarily served after a funeral.

The funeral cakes that were traditional in some denominations in this country, mostly Protestant, were often meant not only to provide refreshment for mourners, but also to be a token of remembrance. A pair of these cookie-like cakes, sometimes called seedcakes in old cookbooks, might be wrapped in black crepe paper or paper printed with such symbols as skulls, and given to mourners to take home as keepsakes.

In his book, ''Traditional Food in Yorkshire'' (John Donald, 1987), Peter Brears, a professor at the University of Leeds in England, documented one instance when funeral cakes tied with black crepe were delivered to homes in the village as invitations to the funeral.

In the United States the custom of serving special funeral cakes has all but disappeared. But appropriately a selection of funeral cakes was offered to guests at the opening reception last week for an exhibition of gravestone carvings at Federal Hall in lower Manhattan, presented by the Museum of American Folk Art. William Woys Weaver, the food historian who researched and adapted the recipes for the reception, said: ''Funeral cakes came here from Europe. They were common in northern Europe, and today the tradition is maintained primarily in rural areas of Sweden.''