WordPress.org

Ready to get started?Download WordPress

Forums

How to set up comment for URL? (4 posts)

  1. ghanes14
    Member
    Posted 4 years ago #

    Hi, I was wondering how do I set up my comment box so that people can include their website URL?

    Right now it's just the textarea, I would like it to show:

    Name:
    Email:
    Website:

    Comment:

    Where, or how do I do this? Thanks.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Try adding:

    <?php if(!$user_ID) : ?>
    <p><label for="author" <?php if($req) echo 'class="req"';?>><?php _e('Name');?> <?php if($req) echo '<small>('.__('required') .')</small>';?></label> <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="20" /></p>
    <p><label for="email"<?php if($req) echo 'class="req"';?>><?php _e('Email');?>  <?php if($req) echo '<small>('.__('required but will not be published') .')</small>'; ?></label> <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="40" /></p>
    <p><label for="url"><?php _e('Website');?></label> <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="40" /></p>
    <?php endif; ?>

    to comments.php just above the textarea markup.

  3. ghanes14
    Member
    Posted 4 years ago #

    I tried and either it's not working or I am doing it wrong. Is there a plugin that will do it?

  4. ghanes14
    Member
    Posted 4 years ago #

    Ok I think I got it. I had to switch the settings so that you do not have to be registered though. So I will likely be fighting the spam all the time.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags