Our Moo went off his food after Buster had been around a few weeks. It's like he realised that this bub was here to stay! I think that food is one of the few things toddlers can control, so it made sense to me that he would refuse to eat while his world had changed. We didn't make a big deal of it and while we kept offering dinner, we also let him have weet bix or whatever comfort food he wanted within reason. Then one day he got over it and picked up his fork and ate his dinner!
Yep. That. Big changes with bub. The Boy has no power except over things like this, so he is flexing his muscles - and getting lots of attention doing it.

He will eat when he realises, a) he's hungry, and b) bub is here to stay.

Good luck!