• Resolved jmarshane116

    (@jmarshane116)


    Hello.

    Can anyone PLEASE tell me how to change the redirect in wpuf-add-post.php?

    When a user on my website is not logged in, and they try to add a post, the message on the webpage reads:

    This page is restricted. Please

      Log in

    to view this page.

    So when the user clicks the “Log in” link, they are taken to my WordPress Admin Login page, instead of the correct Login Page (https://www.okyoucantellme.com/login/).

    Now, I’m not to savvy with .php at all, but I managed to find the code that prints this message inside of the wpuf-add-post.php function, and it is this line:

    printf( __( “This page is restricted. Please %s to view this page.”, ‘wpuf’ ), wp_loginout( get_permalink(), false ) );
    on the web page is

    I also found out that the “%s” equates to:

    Log in

    Which confirms what is happening when the user clicks on the “Log in” link in the message. But I cannot seem to track down where and how to deal with the “%s”.

    What I would like to do is change the redirect so that it send the user to the correct login page on the website, which is: https://www.okyoucantellme.com/login/

    Can anyone show me how, and where, I can make a change to do this? OR have any suggestions that may help, as I am pretty stuck right now and would appreciate any help.

    Thanks so much in advance…

    Jacquie

    https://www.ads-software.com/plugins/wp-user-frontend/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tareq Hasan

    (@tareq1988)

    What plugin are you using for frontend login?

    If you use Theme My Login, it’ll override the login link automatically and will redirect you to your frontend login page.

    Thread Starter jmarshane116

    (@jmarshane116)

    Hi Tareq…thanks so much for the suggestion.

    I use WP Profile Builder for my Login and Register page…

    Late last night, I played around with the code again and after breaking my site several times, I ended up replacing the “printf” statement with 2 “echo” statements, and it seems to work now. Hopefully I won’t find out later that I broke something…

    I will take a look at the Theme My Login plugin and see what it offers…

    Thanks a million…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to change the redirect for New User Notification Email’ is closed to new replies.