Ow! you have my sympathy! I developed horrid piles a few weeks ago (during my second pregnancy). The creams and suppositories did not work for me. You may well need referral to a specialist, but the following may help you long term (anyway, this is what helped me).
The following did work for me(over about 2 weeks) to get my system to a point where the piles disappeared.
First, pushing them back in each time they popped out was essential. This was really gross and painful, and did not work at first. But after a week or so, they stayed in and really healed up.
Second, in NZ here we have something called "Metamucil" (not sure if you have it where you are, but you may be able to get something similar in a pharmacy or healthstore or even the supermarket). It is not particularly for piles, but for helping make stools easier to pass. It is a powder that you mix with water, it becomes jelly-like in your system. It is basically natural fibre (that you'd get into your system by eating a huge amount of bran etc but that never worked for me). It is totally safe to have while pregnant or breastfeeding as it is only fibre.
What it does is help your system so that your stools become easier to pass (making the whole loo experience less excruciating and in the long run hopefully keeping the piles away).
Third, try and increase your water intake and get a bit of exercise (even just a little).
While this all worked for me, yours sounds worse than mine and you may need specialist help. But if you are able to take the above steps in conjunction with that, then you have the best chance of keeping them away.
Enjoy the new baby! I hope you get better soon.