Hi,
Welcome to the ehealthforum and I am really glad to help you out. Pregnancy occurs only during the time of ovulation. Ovulation is the release of a single, mature egg from a follicle that developed in the ovary. It usually occurs regularly, around day 14 of a 28-day menstrual cycle.
So if your menstrual period was 12th or 16th July, the ovulation would have been around 25th July or 29th July. So If you had intercourse on 25th July and 28th July/ 1st August, the child seems to be your boyfriend's. However, this may not be 100% true and the real answer can come only from the paternity test.
I sincerely hope this information helps. Take care.