This topic contains 0 replies, has 1 voice. Last updated by Richard Rittorno 3 years, 10 months ago.
Topic Author | Topic |
---|---|
Posted: Wednesday Feb 13th, 2013 at 10:46 am #41611 | |
Hello, I’ve read through the post here concerning the Custom Capabilities and API scripting and did find a update since the video, However, I’m still having problems and was wondering if anyone might be able to help. I’m looking to restrict a category to level 1 with the custom capabilities of “optionweekly” as per the video I place the PHP code into the functions.php file of theme. The issue is the code is not restricting access and allows for everyone to view. If I place CC keyword into the post Custom Capability under SA options everything is great but I’m looking do this through the Functions file and automate Any help would greatly appreciated…. Functions.php – Code <?php add_action ("wp", "my_custom_capabilities"); function my_custom_capabilities () if (is_category ('weeklyoption') && !current_user_can ('access_s2member_ccap_woi')) } |