As 'sinker' has already pointed out, 'in loco parentis' would not apply in such a case.
'in loco parentis' applies when a person is acting as a parent. The literal meaning is 'in the place of a parent'
For example, I am a qualified badminton coach. If I'm taking a session of juniors, then I am acting 'in loco parentis', and am as responsible as the parent would normally be for the child's safety and well-being.
In a case such as this, the principle of 'duty of care' would apply. For example, making a fence that a person would have to deliberately climb over (and making it difficult to do so), and putting warning signs up, would usually satisfy any legal requirement. Though that exact level of requirement would vary, depending on the popularity of the area with the general public, the accessibility of the site, if dangers were obviously visible, etc.
It's one of those cases that would need to be risk assessed by the landowner on it's merits. If (for example) the site was alongside a well-used path, level and dry walkway straight in, with an open stope to the sky 40 yards in providing plenty of light and 'tempting' people to explore, then it could well be said that a complete caging off of the access would be required. If, on the other hand, there was 2 feet of water issuing from the same access, then a simple wooden fence and a couple of warning signs may well be judged adequate.
Madness takes its toll, please carry exact change