How to fix a object swinging on a metal bar?

I am making a flap door on my dog’s house and I’ve done everything, but I have issues with hanging the door on the house, I don’t have a lot materials to use, so I just used some wires, but the door swinged left and right and I couldn’t even get it to be straight, so it was really bad.

So now I came up with a better idea, to install a metal stick/bar or whatever and simply have the door/flap swing on it, it works perfectly, plus it even slows the door down, so that even strong wind doesn’t sway it up and down, but only the dog, however, since it is just a basic metal stick, it doesn’t have anything to prevent the door from moving from the middle and going left or right, so how can I fix that easily, without having to weld stuff on the metal stick?

The stick is kind of thick, so I can’t really change its shape to have 2 ,hang stuff here" parts, I’ve done that with the wires, but wires sucked even with that, so…

Couple of hose clamps?

At first I thought you had a flap hanging from the top of the doorway. A piece of chain or steel affixed to the bottom to weight it keeps it from flapping in the wind. Then I thought you had it hinged on the side sort of like hollywood old west saloon doors. To keep it closed, though, once you have steel involved magnets work pretty well grabbing and holding it in place.
grammar Nazi: You do understand what a period is for, don’t you?

Magnets are your friend … no periods needed …

If its a small metal bar could you use internal star washers?

Use water bottle lids as bushing washers. You may have to trim them. Poke a hole in each cap and slide it on your metal stick, on each side of the flap.