Whenever you have two very distinct user bases, it's better to separate them as soon as possible. Have different sites for each of them. Behind the scenes, these sites could share 99% of the code and layout, but as far as the user sees it should be a completely different portion of the site.
This way advertising that focuses on one demographic or the other can land directly on the different part of the site. The generic home page that services both should have big happy buttons that lead to the separate site views.
Because it's not just products (ideally) that will change; it's also the way you phrase things, the types of features you focus on, the decorative content. Parents will have very different needs than Teachers or Kids, and the site you create to sell to them should have a different design to match. So it's not just a filter on the product... it's more a different site. You should enable and encourage your designers to provide different content specific to the type of user by splitting the demographics into separate areas early. Even if you don't have separate designs now, you should make it so you can.
And this change completely removes the need for a filter. It's two sites, with different products. The back end might filter based on whether the URL contains /parent/ or /teacher/, so the code would be nearly identical, even though the UX is completely different.