WordPress.org

Support

Support » How-To and Troubleshooting » How would I wrap this in an “if” statement

How would I wrap this in an “if” statement

  • For my registered commenters, I’d like to add this link to my comment template:

    <a href="?author=<?php echo $comment->user_id ?>"><?php comment_author() ?></a>

    What would I put around that code so that the link only appears for comments left by registered users?

    I still want others to be able to comment, but I’d like this link to appear for the comments left by registered users.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How would I wrap this in an “if” statement’ is closed to new replies.