Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 26 through 30 (of 30 total)
  • @tse11

    Participant

    First thing I would do is refresh or change my permalinks settings…this could be why you are having that issue. If that doesn’t work, make sure your .htaccess file is up to par, you can google for the right settings for your site depending on whether you are a Multisite or Single wordpress install.

    @tse11

    Participant

    If anyone knows how to do this, I would soooo appreciate it! Please

    @tse11

    Participant

    @bphelp Thanks a lot for helping. I tried both codes, what’s happening is now every time I click any page, I’m being redirected to wp-admin. Removed code of course.

    @tse11

    Participant

    Anyone can help with this, please?

    @tse11

    Participant

    @bphelp
    Thanks! I have scoured the forums and have not found the exact thing that I need, but I guess it’s all in the wording of search terms 😉

    This is the code I have for the plugin I am using:

    function buddypress_login_redirection($redirect_url,$request_url,$user)
    {
    	global $bp;
    	$selected_option = get_option('blr_select_redirection');
    	if($selected_option == 'one')
    	{
    		return bp_core_get_user_domain($user->ID);
    	}
    	elseif($selected_option=='two')
    	{
    		$activity_slug = bp_get_activity_root_slug();
    		$redirect_url = $bp->root_domain."/".$activity_slug;
    		return $redirect_url;
    	}
    	elseif($selected_option=='four')
    	{
    		//$activity_slug = bp_get_activity_root_slug();
    		//$redirect_url = $bp->root_domain."/".$activity_slug;
    		$redirect_url = $_SERVER['HTTP_REFERER'];
    		return $redirect_url;
    	}
    	else
    	{
    		$activity_slug = bp_get_activity_root_slug();
    		$friends_activity = bp_core_get_user_domain($user->ID).$activity_slug."/friends/";
    		return $friends_activity;
    	}
    }
    function buddypress_login_redirection_menu()
    {
    	add_options_page(__('BP Login Redirect Settings','blr-menu'), __('BP Login Redirect Settings','blr-menu'), 'manage_options', 'blrmenu', 'blr_settings_page');
    }
    function blr_settings_page()
    {
    	if (!current_user_can('manage_options'))
        {
          wp_die( __('You do not have sufficient permissions to access this page.') );
        }
    	$opt_name = 'blr_select_redirection';
    	$hidden_field_name = 'blr_submit_hidden';
    	$data_field_name = 'blr_select_redirection';
    	
    	$opt_val = get_option($opt_name);
    	
    	if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' )
    	{
    		$opt_val = $_POST[ $data_field_name ];
    		update_option( $opt_name, $opt_val );
    ?>

    Any idea where I would add those conditions you mentioned?

Viewing 5 replies - 26 through 30 (of 30 total)
Skip to toolbar