Want more features on Pastebin? Sign Up, it's FREE!
Guest

redirect

By: a guest on Jan 2nd, 2012  |  syntax: None  |  size: 0.31 KB  |  views: 31  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function bp_guest_redirect() {
  2. global $bp;
  3. if ( !bp_is_page( om ) ) { // enter the slug or component conditional here
  4. if(!is_user_logged_in()) { // not logged in user
  5. wp_redirect( get_option('siteurl') . '/om' ); // user will be redirect to any link to want
  6. }
  7. }
  8. }
  9. add_filter('get_header','bp_guest_redirect',1);
clone this paste RAW Paste Data