@wirelab
10 years, 1 month ago
Update: I added the function to my child theme functions.php and it seems to be working now.
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'); ?>
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'); ?>
sorry buddypress 2.1 wordpress 4.0