Advertisement
imath

Hide rss link on private and hidden BuddyPress groups

Apr 27th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2. // add this code in the functions.php file of your theme
  3.  
  4. //if your theme doesn't use bp_head hook, then choose wp_head hook.
  5. add_action('bp_head', 'egrefin_hide_private_hidden_group_rss_via_custom_css');
  6.  
  7. function egrefin_hide_private_hidden_group_rss_via_custom_css() {
  8.     if( bp_is_current_component( 'groups' ) ){
  9.         global $bp;
  10.        
  11.         if ( isset( $bp->groups->current_group->status ) && 'public' != $bp->groups->current_group->status ) {
  12.             ?>
  13.             <style>
  14.             div#subnav li.feed{
  15.                 display:none;
  16.             }
  17.             </style>
  18.             <?php
  19.         }
  20.        
  21.     }
  22. }
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement