For some children it is necessary to start with the lid down and the pants up. You must positively reinforce your child's successes. At first success will be nothing more than coming into the bathroom with you willingly. Eventually it will be sitting on a toilet with his pants down and the lid up. Even when he is finally having bowel movements regularly on the toilet you must continue to focus on his success.
Success is important.
Reward it with praise. Keep track with stickers or stars in a calendar or log. Plan a celebration for big steps or multiple successes. Don't let any messes distract you from his successes. Your child would like nothing better than to please you.