This topic contains 1 reply, has 2 voices. Last updated by Jason (Lead Developer) 3 years, 10 months ago.
Topic Author | Topic |
---|---|
Posted: Thursday Feb 14th, 2013 at 7:38 am #41691 | |
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 Do I need to upgrade in order for this work? 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')) } |