Honestly? For most cats, you do not get them to wear a hat. You get about three seconds while they decide whether to object, and you take the photo in those three seconds. That is the entire technique, and anyone selling you more than that is selling you a struggle.
Will my cat wear a hat at all?
It depends entirely on the cat. A relaxed, food-motivated cat will often sit in a hat for a surprisingly dignified moment. Most cats tolerate it for a beat and then want it off. A few will not have anything on their head, full stop, and will tell you immediately. All three reactions are completely normal, so do not read your cat's reaction as a verdict on your parenting.
The three-second method
Have the treats out and the camera already open. Put the hat on gently, say something calm, take the photo in the first few seconds before the novelty wears off, then take the hat straight back off and hand over the treat. The cat learns that hat means a snack and a quick fuss, not a fight. Do that a few times and the three seconds get easier.
Fit is most of the battle
A hat that is too heavy, too tight, or scratchy comes off in one shake. You want something light, with a soft elastic chin cord you can loosen, sized for a cat rather than a small dog. If it perches without pressing, most cats forget it is there for just long enough.
When to stop
Flattened ears, a frozen crouch, or backing out of the hat are all a clear no. Respect it the first time. A hat is a prop for a photo, not a lifestyle you are enrolling your cat in, and a cat that had a calm experience this time is a cat who might give you five seconds next time.
Our version
The Mugiwara Hat is a real woven straw hat sized for a cat, with a soft chin cord, in three colours. 麦わら mugiwara just means straw. It is built for the three seconds, and completely honest about being exactly that.