Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Change hyperlink to User Registration page instead of WordPress login page

You can use this code in your function.php:

$args = array('must_log_in'=> '<spam class="must-log-in">' .  sprintf( __( 'You must be <a href="https://wordpress.stackexchange.com/questions/256371/%s">logged in</a> to post a comment.' ), HERE YOUR CUSTOM PAGE URL ) . '</spam>');
comment_form($args);

Related Posts:

  1. How to change “You must be logged in to post a comment.”
  2. How to retain comment text on comment form after login/registration?
  3. What should I do to make generated avatars different for anonymous comments?
  4. How to Block Access to Standard Login Flow and Comment Flow
  5. Display commenter’s registration date on comments?
  6. Send Notifications to All Admins
  7. Registered but Anonymous comments
  8. Log in link not showing, Comment Issue
  9. How can I test why the comment hook is not working?
  10. How can I convert anonymous commenters into registered users?
  11. All users/comments suspected as bot? [closed]
  12. Automatically register users with comments
  13. How to replace anonymous comment form with a registration form on wordpress?
  14. How do I convert users who put an email and username for a comment into registered users? [duplicate]
  15. How do I comment out a block of tags in XML?
  16. R: Comment out block of code
  17. Check if wp-login is current page
  18. Why do I get comment spam even with Akismet and Captcha?
  19. What tools are available for managing/writing to WordPress? [closed]
  20. How to rearrange fields in comment_form()
  21. setting comments off as default for pages and custom post types?
  22. Separate registration and login for different roles
  23. SSO / authentication integration with external ‘directory service’
  24. Is it possible to pull comments from facebook into your blog?
  25. How to prefill WordPress registration with social details
  26. Filtering the Admin Comments List to Show Only Comments from the Current User?
  27. Non-threaded comment replies with link to original comment
  28. Approve comment hook?
  29. Commenting in user profile page?
  30. comment_post_ID 0 (cannot remove from dashboard)
  31. Disable comments on all posts/pages
  32. How do I delete all comments from a specific old blog post?
  33. Removing the “Website” Field from Comments and Replies?
  34. Stop WordPress redirecting comment-page-1 to the post page?
  35. Importing old Disqus comments into WordPress
  36. How to add a class to the comment submit button?
  37. How to wrap submit button of comment form with div
  38. How to enable comments for pending and draft posts?
  39. Using WordPress’ WYSIWYG for comments
  40. Enable Submit Comment Without Page Reload (Using Ajax)?
  41. What for is the table “wp_commentmeta” exactly?
  42. WordPress auto login after registration not working
  43. Getting Post Comments for post ID using WP_Query() and a Custom Loop?
  44. Add option to disable comments on a per posts basis?
  45. Resetting comment count
  46. When importing – failed to import: Invalid post type feedback
  47. How to change the email notification recipient (user) for new comments?
  48. Redirect user to a custom url after submitting the comment
  49. Paginate result set from $wpdb->get_results()
  50. Woocommerce registration page [closed]
  51. Change Comment Author Display Name
  52. Would switching to InnoDB from MyISAM improve performance of comments table?
  53. Custom comment type based on thread level
  54. How to add internal, revision comments to page updates
  55. How to load and show comments with AJAX instead of pagination?
  56. Linking to Page Showing Only Comments Without Parent Post
  57. Comment Reply javascript
  58. How do we remove the H3 tag for the reply-title I.D
  59. Comments not appearing at all
  60. comments reply script not working
  61. How to display comment form error messages in the same page
  62. 3 moderators to approve comment
  63. How to deal with small scale comment spam on small commercial sites? [closed]
  64. A plugin where users can comment with Facebook or Twitter or OpenID [closed]
  65. WordPress registration message
  66. Check If comment author is registered
  67. Comments screen in backend, how to disable email address of commenter for non admins
  68. Add comments from the admin panel?
  69. How can I limit the number of comments per registered user per day?
  70. One comment per user per post but be able to reply to existing comments
  71. How build a custom login/register form with error handling?
  72. How to use a custom comments template
  73. Comment visibility
  74. What’s the easiest way to close comments on media/attachments?
  75. Reverse comment pagination numbers
  76. Get comments for more than one post
  77. How can I add comments to a page?
  78. How to remove comment spam in WordPress
  79. Post Comments using WP REST API v2 in WordPress
  80. show number of open comments on custom dashboard
  81. Show content only if member left a comment
  82. Add placeholder attribute to comment form fields
  83. How to remove the WordPress logo from login and register page?
  84. Why do I get accidental comments without (the required) email address?
  85. How is comment spam received without a comments form?
  86. Does a reply to a wordpress comment notify the author of the comment?
  87. What are the current recommended best-practices for comments.php?
  88. human_time_diff() returns “48 years ago” for all comments
  89. How do I set up real anonymous posting in bbpress forums? [closed]
  90. Comment Count for each Comment Author
  91. Link name in comments to Author page? Comment Author Meta in Comments?
  92. How do I turn off wordpress comments ability to capture a users ip address?
  93. Showing comments only to same custom user role
  94. Login email after registration never sent or received
  95. Parent comment’s author name
  96. Success message in comment form
  97. get_comments_number of depth-1 (Level 1) (1 post)
  98. Show comments from multiple post IDs in comment template
  99. Running a function on comment status change
  100. How to allow the reply link to remain on the comment form after I have reached my 10 nested comment limit?
Categories comments Tags comments, login, user-registration
My own metabox checkbox plugin only saves the last value I’ve checked
Quick Edit in custom posts no show columns after save

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress