Q: How does one love others (e.g. parents, siblings, friends etc) only for Allah Ta’ala?
A: Regularly meditate over the fact that Allah alone is eternal. If you love anything for Him then that love will be lasting and if it is that you love something not for the sake of Allah then your love will remain just till you or that thing remains.
And Allah Ta’ala (الله تعالى) knows best.