Does putting onions in front of the door affect the door?

Putting onions in front of the door is a custom in some places and has no effect on the door. When I was a child, I always hung onions in front of the door. ? The reason for this custom is that "onion" and "smart" are homophonic, and the host family wants their children to be smart in the future, so they will hang onions on the door. Generally, after a pregnant woman gives birth safely, the family will hang a piece of red cloth on the gate to announce the safe birth of the child next door. At the same time, hang onions on the door with red lines. When the onion is wilted, it should be replaced, so that the child can always be smart in the future. ? In addition, hanging dates and chestnuts on the door is the same. They all express that the elders want their children to be smart and express a good wish.