• Resolved deathbybots

    (@deathbybots)


    When the user is not logged into my wordpress site, the user post page requests the user to login first before posting via the user submitted post page. Is there a way to change or redirect the login link to go to a new login page?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Glad to help. There isn’t a plugin setting for it, but you can add the following code to your theme functions.php file (or add as a custom plugin):

    function usp_customize_login_required_message($message) {
    	return '<p>Please <a href="https://example.com/wp-login.php">register</a> to submit content.</p>';
    }
    add_filter('usp_require_login', 'usp_customize_login_required_message');

    Then you can edit the href value as desired. FYI this technique is documented at Perishable Press.

    Thread Starter deathbybots

    (@deathbybots)

    Thanks

    Thread Starter deathbybots

    (@deathbybots)

    After making the suggested changes, I am now getting this error and can no longer login using the plugin pages.

    Warning: Cannot modify header information – headers already sent by (output started at /home/storyproject_xyz/thelifestoriesproject.com/wp-content/themes/suevafree/functions.php:1) in /home/storyproject_xyz/thelifestoriesproject.com/wp-includes/pluggable.php on line 1216

    Any ideas?

    Plugin Author Jeff Starr

    (@specialk)

    Looks like your theme is doing something special with PHP and/or how it outputs HTML. You need to ask your theme developer the best way to add a small custom snippet. They will best be able to help you implement the technique.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Redirect Login URL’ is closed to new replies.