Title: Include website in comments
Last modified: August 19, 2016

---

# Include website in comments

 *  [greenblue](https://wordpress.org/support/users/greenblue/)
 * (@greenblue)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/include-website-in-comments/)
 * Hi,
    I’ve had a search for this but can’t seem to find it in the forums. There
   is a field for website in the basic comment forms. Is it possible to link the
   Nickname they have chosen to the website they have inputed were it a valid website
   url? Thank you in advance.
 * Regards,
    Nick

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/include-website-in-comments/#post-674168)
 * These two template tags provide that:
 * [http://codex.wordpress.org/Template_Tags/comment_author_link](http://codex.wordpress.org/Template_Tags/comment_author_link)
   
   [http://codex.wordpress.org/Template_Tags/comment_author_url_link](http://codex.wordpress.org/Template_Tags/comment_author_url_link)
 *  Thread Starter [greenblue](https://wordpress.org/support/users/greenblue/)
 * (@greenblue)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/include-website-in-comments/#post-674173)
 * Thanks for the quick response Kafkaesqui. The second link works for me when put
   in the comment loop, but the first one doesn’t do anything. Am i suppose to add
   anything inside the brackets?
 * <p><?php comment_author_link(); ?></p>
 * I’ve just stuck that straight in…
 * Thanks,
    Nick
 *  Thread Starter [greenblue](https://wordpress.org/support/users/greenblue/)
 * (@greenblue)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/include-website-in-comments/#post-674258)
 * Ok, I’m going to go with the second link. [http://codex.wordpress.org/Template_Tags/comment_author_url_link](http://codex.wordpress.org/Template_Tags/comment_author_url_link).
   This works fine for me but is there any way to not show the link if no information
   was entered into the website input field? At the moment it shows “visit author’s
   website” for everyone, and if they dont enter an info, the link just goes to 
   my website.
 * THanks
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/include-website-in-comments/#post-674261)
 * This is a mod of what I have in my comments template:
 *     ```
       <?php
       if( get_comment_author_url() ) : ?>
       <a href="<?php comment_author_url(); ?>"><?php comment_author(); ?></a>
       <?php else : ?>
       <?php comment_author(); ?>
       <?php endif; ?>
       ```
   
 * That tests if get_comment_author_url() returns a value, displaying the comment
   author’s name as a link to their site when it does, and plain when it doesn’t.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Include website in comments’ is closed to new replies.

## Tags

 * [comment](https://wordpress.org/support/topic-tag/comment/)
 * [linking](https://wordpress.org/support/topic-tag/linking/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/include-website-in-comments/#post-674261)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
