Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #319595

    hi!
    the link in

    You must be logged in to post a comment.

    refers to the standard URL (http://<homepage>/wp-login.php).
    Is there a possibility to change this to a custom link within the theme?

    regards,
    fri_z

    #319907

    Hey Fritz!

    Please add following code to Functions.php file in Appearance > Editor and change the link as needed

    function add_custom_login_target(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('p.must-log-in a').attr('href','YOUR LINK GOES HERE');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_login_target');

    Regards,
    Yigit

    #320368

    Great. Works fine. thx.
    Actually I found another solution without Javascript here: http://rocketgeek.com/tips-and-tricks/redirecting-wordpress-login-and-logout-urls/

    #320393

    Hi!

    That is definitely more solid :) Thank you for sharing! Let us know if you have any other questions or issues

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘login url / comment element’ is closed to new replies.