Doesn't work, what if both are on the same page such as a home feed? Analogy: the theater shows both R and PG movies, so a forcefield prevents kids entering the building on days where an R movie is shown at any time in any theater that day.
If the website doesn't want to make a filtered version than the metadata can mark the page as R with an additional indication that PG content is present on the page. The parent can manually select the PG content or someone will make parental controls that can automatically select or (like an ad blocker) filter for only the PG content.