To change the login link only in this template, replace the wp_login_url()
function call with your login link:
'must_log_in' => '<p class="must-log-in">' . sprintf(
/* translators: %s: login URL */
__( 'You must be <a href="https://wordpress.stackexchange.com/questions/258398/%s">logged in</a> to post a comment.' ),
"https://yourdomain.com/my-account"
) . '</p>',
If you want to generally redirect users to another url if they need to log in, it is better to use the filter login_url
:
function wpse_258398_login_url ( $login_url, $redirect, $force_reauth ) {
return "https://yourdomain.com/my-account";
}
add_filter( 'login_url', 'wpse_258398_login_url', 10, 3);
Be aware though, this will affect all redirects to login. Even when you are redirected to login for the admin backend.
Related Posts:
- changing font size and font of a custom message added after comment
- Highlight comments of all the site authors
- Show comments based on user role in front end
- Customized Comment Form Issues
- How to remove comment section from page only , not from posts pages?
- Change the login button on the login page
- Modify column_author in WP_Comments_List_Table
- Custom ReCaptcha Login
- What is the proper way to apply the login_form_bottom filter?
- Does WordPress Allow Blank/Empty Comment Submissions In WordPress?
- How to override wp-login.php
- Remove Links from Login page
- Adding Custom Fields to WordPress Comment Forms?
- How to change submit button value in comment from “Post Comment” to “Send”
- Rearrange elements outputted by comment_form()
- Add comments meta fields to comments metabox on post edit screen
- Getting $comments outside the comment template
- setting a specific home page for logged in users
- Limit comments displayed on basis of user_id
- Redirect to requested page after (custom) login
- Comment filtering (search)
- Prevent WordPress from loading comments
- Customizing the default logout page of WordPress
- How can I & how do I change text displayed in comment via child theme
- How do I remove the eye icon that shows visibility on login screen and reset password screen
- multiple comment text areas
- Comments not nesed with custom template
- Custom Login and Registration form in Ajax
- Comments Confusion
- Last time a user logged in
- show the meta values to visitors that collected via coment form
- How can I allow access to multiple users, using the same login, at the same time?
- Add Div to Comment Form
- WordPress custom login page
- Change order of comment fields
- Adding a login form that concatenates three fields into a username
- Properly customizing login/register form
- Fastest way to get the comment and ping total count for a post
- How to add an extra variable to login and authenticate it?
- How to retain comment text on comment form after login/registration?
- Login/Logout Session Sharing – Multiple WordPress Installations
- Custom login with external provider iframe and data object
- Deep customization of wp-login.php
- User can not login
- Lost password empty field error redirect to custom login
- Custom comments list, right depth
- Custom Log In Screen – Disable password recovery [duplicate]
- Multi-site User Sessions
- A truely custom login page?
- Adding comments to my custom theme
- Switch between WordPress websites easy for an end user
- Lost password and back to blog in same line
- I w’d like to know If there are simple solutions to integrate other CMSs to wordpress
- Restrict content access to logged in users
- Custom login and registration forms
- Customizing Comments
- URL and Site title outputting on Login page
- Is it possible to integrate a custom login feature with wordpress?
- Attach File Funcion for Common people
- How to change the login page without a plugin and not only customizing logo and text around the form?
- Removing “Failed” query argument upon successful login
- Validate user login in php
- how to change the url rediction of the woocommerce login page of the flatsome theme for my own in wordpress?
- How to change Login default blue admin color?
- How can I style the Comment Section of a blog post
- Latest update broke my custom login CSS
- Trouble with custom login page
- Wrap WordPress Login Form in custom Div
- Automatically reject a comment if website field contains anything
- Custom Avatars for WordPress Comments VIA Website URL?
- Custom login doesn’t stay
- Check get_post value after wp-admin login
- where can i find the login page in wordpress and add my header to it
- Change the default WordPress image on the dashboard login to a custom image [duplicate]
- Pass the post ID
- Changes in comments.php in the child theme does not show up on the site
- Show Site Name on WP login screen
- how to manage Session in WordPress using custom login?
- Redirect all pages to the custom login page except for the registration page
- How to stop login for SPECIFIC users BEFORE a specified date
- How to use more than 256MB of memory in the admin?
- How to get current_cat in navbar, in single post
- Add URL field to the link post format
- How to change URL Custom Page?
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Customizing default Mediaelement player
- Can not sanitize select control in customize api
- Multiple RSS feeds scroller in one sidebar
- Silo Structure; Will links from home page to a Sub-category or Post undermine silo seo advantage? [closed]
- Manage multiple domains from one backend
- Ajax submit comments
- Toggle custom fields?
- Showing Meta Box via Jquery Checkbox
- Problems with setting up a subdomain to serve images and scripts
- Disable “-mp4-image” screenshots from appearing in Media?
- Replace publish date in blog module with custom field
- How to make my wordpress site responds for 2 domains
- How to fix vanilla comments extra iframe space
- How to answer, and we aren’t using WordPress to manage your site? [closed]
- Reply form used in wordpress.com