• Resolved Mitch

    (@n2rga)


    When login it redirects to /wp-admin/ for the Admin no problem. For users, it’s a problem on logout, it does the same and says “You don’t have permission to access this page.”
    I tried the redirect you wrote for someone else and it didn’t work. I had a hide login plugin that loads sign-in with then /login URL and also tried it without that plugin. Same problem.

    `add_action(‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’);
    function my_theme_enqueue_styles() {
    wp_enqueue_style(‘listingpr-parent-style’, get_template_directory_uri() . ‘/style.css’);
    }
    add_filter( ‘login_logout_menu_login’, ‘login_logout_menu_login_cb’ );

    /**
    * Customize the login/logout menu Login Link.
    *
    * @param string $login_logout_menu_login The login link.
    * @return string The modified login link.
    */
    function login_logout_menu_login_cb( $login_logout_menu_login ) {
    return site_url() . ‘/login’;
    }

    add_filter( ‘login_logout_menu_logout’, ‘login_logout_menu_logout_cb’ );

    /**
    * Customize the login/logout menu Login Link.
    *
    * @param string $login_logout_menu_logout The login link.
    * @return string The modified login link.
    */
    function login_logout_menu_logout_cb( $login_logout_menu_logout ) {
    return site_url() . ‘/login’;
    }`

    • This topic was modified 2 years, 4 months ago by Mitch.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Mitch

    (@n2rga)

    took out the funtion.php code and added #home to the login/logout menu item works good now. the only problem now, is for Users the profile link goes to /wp-admin/profile.php, and errors “you do not have permission”.

    Plugin Support Muhammad Arslan

    (@wparslan)

    Hey @n2rga

    First, we apologize for the very late reply.

    The profile link can be changed with the help of a filter.

    Here is the documentation on how you can change the filter with a hook: https://loginpress.pro/doc/login-logout-menu-filters/

    Let us know if you need any assistance, we will help you.

    Have a nice day!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘redirects to wp-admin on login and logout’ is closed to new replies.