• Resolved hetal25

    (@hetal25)


    i try to login page redirect to profile edit page using 
    function redirect_to_user_profile_edit_page() { // Check if the user is logged in if (is_user_logged_in()) { // Check if BuddyPress is active if (function_exists('bp_is_active')) { // Get the current user's username $current_user = wp_get_current_user(); $username = $current_user->user_login; // Construct the profile edit page URL $profile_edit_url = home_url("/members/{$username}/profile/edit/group/1/"); // Check if the current page is not already the profile edit page if (!bp_is_current_component('profile') || !bp_is_current_action('edit')) { // Redirect the user to their profile edit page wp_redirect($profile_edit_url); exit; } } } } add_action('init', 'redirect_to_user_profile_edit_page');

    but all page url is redirect to profile edit page need to only login page redirect to this url

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Youzify

    (@kainelabsteam)

    Hello @hetal25,

    Do you mean you want to set redirect to Profile Page after login? If yes, no need any code. You just set it on on Youzify Panel >> Login Settings >> Redirect Settings.

    Best Regards, KaineLabs Team.

    Thread Starter hetal25

    (@hetal25)

    Hii ,

    Thank you for your response but in setting which page set after login redirect because there is not page for profile edit page youzify there is only pages display from pages wordpress not youzify plugin pages .

    Thank You,

    Plugin Support Youzify

    (@kainelabsteam)

    Hello

    I tested on our tetsing site and the “Profile” option is exist there and it’s working fine after I select it. Kindly check this screenshot

    https://ibb.co/6vqg3kq

    Please try go to Settings >> Permalinks and click “Save” button.

    Best Regards, KaineLabs Team.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘redirect login to Profile edit page’ is closed to new replies.