The Mid Yorkshire NHS Hospitals Trust, which covers Pinderfields, Pontefract and Dewsbury Hospitals says it has taken the "difficult decision" to suspend visitors from today.
It comes as the number of Covid-19 cases continues to spiral.
In a statement they said: "We understand how hard this will be for people wanting to visit their loves ones, but we need to do what we can to help keep our patients and staff as safe as possible, and reduce the spread of Omicron. "
However, there are some exceptions to visiting, including immediate family members/partners of those at the end of their life and carers of patients who require assistance.
Birthing partners will still be able to accompany expectant mothers, one parent can still stay with a child on the children's ward, while there is also limited visiting in critical care.
The trusts said: "In all these circumstances, we are asking visitors to please contact the ward they wish to visit beforehand.
"Thank you for your understanding."