بسم الله الرحمن الرحيم
(Fatwa: 715/715/M=1434)
The woman was pregnant and it was learnt after divorce then her iddah shall be over after birth. After that the gap between the nikah and child birth shall be observed. If the child was born after six month from the nikah or more than it then the child shall be considered legitimate and the husband should consider him his child, but if the child was born before six months then it shall be considered illegitimate.
Allah knows Best!
Darul Ifta,
Darul Uloom Deoband