Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • @wirelab

    Participant

    Update: I added the function to my child theme functions.php and it seems to be working now.

    @wirelab

    Participant

    Sorry no luck. My bp-custom.php reads as below

    <?php
    function wirelab_check_activity_login() {
    if ( bp_is_activity_component() && ! is_user_logged_in() ) {
    wp_redirect( get_option('siteurl') . '/wp-login.php' );
    exit;
    }
    }
    add_action('get_header', 'wirelab_check_activity_login');
    ?>

    @wirelab

    Participant

    Hi,

    Sorry i need a bit more help as I failed to get it to work. So I created a bp-custom.php under wp-content/plugins

    and added the following below, however my activity-stream page was still accessible without login

    <?php
    // hacks and mods will go here
    function wirelab_check_activity_login() { 
      if( ! is_user_logged_in() && bp_is_activity() ) {
        wp_redirect( '/wp-login.php' ); 
        exit;
      }
    }
    add_action('bp', 'wirelab_check_activity_login');
    ?>

    @wirelab

    Participant

    sorry buddypress 2.1 wordpress 4.0

Viewing 4 replies - 1 through 4 (of 4 total)
Skip to toolbar