Which sexual positions are advised if the female has had a hip replacement?

Follow hip precautio. In general, once you are about 3 months out from surgery, the risk of dislocation is quite low. Sexual positions should adhere to hip precaution recommendations (no hip flexion past 90 degrees, no crossing legs across the midline, no rotating inwards). Safe postions include: "missionary", "doggy-style", and woman on top.
It depends. It is easier to note what should be avoided than which positions are advisable. If surgery was done through an anterior approach, there are no restrictions, but if there is a problem it would be with hyper-extension with external rotation . If surgery was done through a posterior approach, flexion with internal rotation should be avoided.