hi
`1. I use auto login on active plugin
2. I use plugin display all-activity to user profile: domain.com/members/username/all-activity
How do I make BOTH auto login on active + old user every time login success will redirect to domain.com/members/username/all-activityHi Julai,
Please use the following codefunction buddydev_custom_redirect_to_profile_all_activity( $redirect_to_calculated, $redirect_url_specified, $user ) { if ( ! $user || is_wp_error( $user ) ) { return $redirect_to_calculated; } return bp_core_get_user_domain( $user->ID ) . 'all-activity'; } add_filter( 'login_redirect', 'buddydev_custom_redirect_to_profile_all_activity', 101, 3 );
Best regards
BrajeshHow do i change return bp_core_get_user_domain( $user->ID ) . ‘all-activity’;
to custom url: domain.com/activity
Please change this line
return bp_core_get_user_domain( $user->ID ) . 'all-activity';
to
return "domain.com/activity";
Regards
BrajeshNow i work with menu
My theme used this code
if ( bp_is_active( 'activity' ) ) { $profile_setting['activity'] = '<class="menu-activity"> <li><a href="' . bp_loggedin_user_domain() 'all-activity/">' . __( "All Activity", "buddypress" ) . '</a></li> About <a href="' . bp_loggedin_user_domain() 'all-activity/">' . __( "All Activity", "buddypress" ) . '</a></li>
How do i change it to domain.com/activity
Hi Julia,
I am not sure what you are doing with code but changing thisbp_loggedin_user_domain() . 'all-activity/
to
"domain.com/activity"
will work.
It don’t work correct
Here is my website menu full code
<?php if ( function_exists( 'bp_is_active' ) ): ?> <?php $profile_setting = array(); if ( bp_is_active( 'activity' ) ) { $profile['activity'] = '<class="menu-activity"> <li><a href="' . bp_loggedin_user_domain() . 'all-activity/">' . __( "all Activity", "buddypress" ) . '</a></li> <li><a href="' . bp_loggedin_user_domain() . 'activity/">' . __( "My Activity", "buddypress" ) . '</a></li> '; } $profile = apply_filters( 'header_dropdown', $profile );?>
Now i want to change domain.com/username/activity/all-activity
to be: domain.com/all-activitywhat is correct code?
Please post the code on https://pastebin.com and link me. I might be able to help you.
Can you please work with email. I don’t know how to us link you profile and here is not allow attachment. For this explain i need send you full detail attachment.
My email topic: Redirect to /all-activity
The topic ‘ [Resolved] Redirect to /all-activity’ is closed to new replies.