0

It's confusing for unregistered users when they find this statement "You must be logged in to post a comment." takes them to the WordPress login page. As this is the case, I need to change it to user registration page.

2
  • There are many plugins such as Pie Register that exactly can do this for you.
    – Johansson
    Feb 14, 2017 at 7:41
  • I already have the registration form and I'm using woocommerce. I just need to change the hyperlink "logged in" to the log in page for users. Feb 23, 2017 at 23:11

1 Answer 1

0

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="%s">logged in</a> to post a comment.' ), HERE YOUR CUSTOM PAGE URL ) . '</spam>');
comment_form($args);
1
  • I added the code but it didn't solve the problem. I'm using woocommerce on my website. Feb 23, 2017 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.