One of my sons started school nursery when we had only junked the nappy a fortnight before and he had never managed a poo in the toilet
My tips would be:
Patience
Set your cooker timer or phone stopwatch to go off every 20-30 mins then pop him on the loo with a sticker or choc button just for him cooperating with that and sitting on briefly
Think about reading a story to him while he sits on the loo in the hope that eventually he will coincidentally perform whole he is there
Then make a huge fuss
Put him into pants / with his favourite characters on
He will get the idea re wees more quickly if in pants not pull-ups
Probably will want to poo in the nappy first
Let him try weeing standing up next to dad/brother etc
Let him come in and chat while you are on the loo yourself
New book ... Everyone poos or pirate Pete
Make up a little toilet Rhyme to Chant together
Try not to feel that you are failing somehow
And lastly
Patience