This topic contains 8 replies, has 3 voices. Last updated by Suzan Romanov 3 years, 10 months ago.
Topic Author | Topic |
---|---|
Posted: Monday Feb 11th, 2013 at 9:45 am #41400 | |
First, I appreciate anyone that could help… 3 sleepless nights and counting – LOL! This is pretty detailed, but trying to save time by putting everything I could think of. Thank you again for helping me out. XO. **************************************************************************** So here’s the story… Have 4 products that customers can buy… in any combination. So let’s say that are A, B, C, D. So a customer can buy A and C, or just A, or C, D, and A. You get the point. So I watched the custom capabilities video this one (https://www.youtube.com/watch?v=h7zBH938VbA), added the code, and now… I’m getting this error: Fatal error: Call to undefined function add_action() in /home/sbsystm/public_html/member/wp-includes/functions.php on line 12 What’s going on??? Here’s the site on my working: http://member.musicindustrycontacts.biz/ And here’s the code I added to the functions.php file: ============================================================== add_action (“wp”, “my_custom_capabilities”); function my_custom_capabilities () if(has_tag(“A”) && !current_user_can (“access_s2member_ccap_A”)) else if(has_tag(“B”) && !current_user_can (“access_s2member_ccap_B”)) else if(has_tag(“C”) && !current_user_can (“access_s2member_ccap_C”)) else if(has_tag(“D”) && !current_user_can (“access_s2member_ccap_D”)) *note: (in a forum topic that said the add_action line was outdated so I used the line I saw in the forum, so it looks a bit different than what’s in the youtube video. I know I’m a novice at the programming stuff but what is happening here??? Instructions seem pretty basic but it just not working. Not sure… but something is missing? Please help!! *Kisses. |