Community Support Forums — WordPress® ( Users Helping Users ) — 2011-09-06T22:20:51-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14875 2011-09-06T22:20:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14875&p=34161#p34161 <![CDATA[Re: customizing what gets shown and how...]]>
I hope that helps. :)

Statistics: Posted by Cristián Lávaque — September 6th, 2011, 10:20 pm


]]>
2011-09-05T14:46:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14875&p=34063#p34063 <![CDATA[customizing what gets shown and how...]]>
I'm trying to hide a chat script from appearing on my buddypress site under certain conditions. The conditions are:

1) Only level 1 members and higher can see the chat script.
2) The chat script shouldn't appear on any of my payment pages.

So, I added the code below to my themes header.php file:

Code:
<?php if(current_user_can("access_s2member_level1") OR (!is_page( array( 100, 1773, 1791, 1778, 1784 ) ) ) ) {
               
            echo '<link type="text/css" rel="stylesheet" id="arrowchat_css" media="all" href="/arrowchat/external.php?type=css" charset="utf-8" />';
       echo '<script type="text/javascript" src="/arrowchat/includes/js/jquery.js"></script>';
            echo '<script type="text/javascript" src="/arrowchat/includes/js/jquery-ui.js"></script>';
              
             }
            ?>


However the chat script still shows. But if I isolate the code to just one query ie, use just
current_user_can or !is_page they work fine independently, but combined together it doesn't work

What am I doing wrong?

Thanks
Rob.

Statistics: Posted by godrob — September 5th, 2011, 2:46 pm


]]>