We useif onlyto express a strong wish that things could be different. It means the same asI wishbut is stronger. We use it to talk about past, present and future unreal conditions.
We useif only+ past verb forms to talk about a wish for the present:
If onlyhe knew the truth.(he doesn’t know the truth, but he wishes he did)
Not:If only he knows the truth.
If onlythere was something she could do or say to help.
Not:If only there is something she could do or say to help.
We sometimes usewereinstead ofwasin more formal situations:
If onlyshe weren’t so tired.(If only she wasn’t so tired.)
To talk about a wish for the future or to show a contrast between how things are and how we would like them to be, we useif only+would+ infinitive withoutto:
If onlysomeone would buy the house.
If onlythey would talk to each other.
We useif only+ past perfect to talk about a wish to change something that has already happened:
If onlyhe had listened to what his friends had been telling him.(He didn’t listen.)
If onlyAnna had been able to come.(Anna wasn’t able to come.)
See also:
Conditionals
If