We went in the summer of 2021 with an 11 and 7 year old.
Stayed in the centre- York Place.
The public transport was absolutely amazing.
I downloaded 2 apps... Transport for Edinburgh or something. These were fab for helping which bus or tram to catch etc.
One app plans the route, the other you can buy your ticket on. Make sure you activate the ticket before boarding, then you just show the phone screen to the driver or ticket inspector.
We did the zoo- really good day, we took a picnic with us.
Also did Camera Obscura- that took a couple of hours and was really good.
The castle was ok- but probably wouldn't rush back to that- it was very heavy on Scottish military history.
The royal yacht Brittania was absolutely brilliant- so much better than I was was expecting. That took a couple of hours too- and is actually accessed through a shopping mall that had places to eat in.
We had a day at Portobello beach as well.
Also had an afternoon just wandering around, we went to find Tom Riddles grave and a few other Harry Potter things.
There was an Italian restaurant just near York Place called Mama Roma- it's probably the best restaurant we've ever eaten at. Very friendly for children too.