This topic contains 2 replies, has 2 voices. Last updated by Raam Dev 4 years, 7 months ago.
Topic Author | Topic |
---|---|
Posted: Tuesday Jun 5th, 2012 at 12:37 pm #15538 | |
hello s2friends, first of all, thank you for the wonderful plugin! i am running a site where users can sign up to be part of a ‘silo’ whereas each silo can only access two specific categories. there are multiple silos, with each silo only having access to their two specific categories and none other. this is being accomplished with custom capabilities: when users sign up, they are given two capabilities, each one being the name of the category they can access – e.g: pizza_a, sandwich_a i have created a template_redirect action in my functions.php which is being used to redirect URIs like /pizza and /sandwich to their respective /pizza_a and /sandwich_a categories — this is working splendidly. now i am tasked with preventing access to other categories. i have used the following, well-documented content protection scheme:
this works great, but do i really have to make one of these blocks for each silo i wish to protect? of course, i would like to discover some dynamic option by which i do not have to create a massive if/elseif block for each silo, and having to edit the code every time a silo is added (there are to be a multitude of silos) any ideas or do i just need to hardcode this? thank you for your time. |