My comment boxes are not displaying placeholder text

I have a wordpress site where the comment boxes do not display the site owner text. It has 4 fields. one each for name, email, website, and comment. The first 3 fields have no place text for space, which makes it difficult to determine which field is for what. Here is a piece of code I found in the comments.php file and I believe this is what is causing the problem.

Any help in fixing my problem?

$fields = array(
    'author' => '<div class="comment-left pull-left">
                        <p class="input-block">
                            <label for="comment_name" class="required">'.__('Name',  kopa_get_domain()).' <span>*</span></label>
                            <input type="text" id="comment_name" name="author" class="valid">
                        </p>',
    'email' => '<p class="input-block">
                            <label for="comment_email" class="required">'.__('Email',  kopa_get_domain()).'<span>*</span></label>
                            <input type="text" id="comment_email" name="email" class="valid">
                        </p>',
    'url' => '<p class="input-block">                                                
                            <label for="comment_url" class="required">'.__('Website',  kopa_get_domain()).':</label>
                            <input type="text" name="url" class="valid" id="comment_url">                                                
                        </p>
                    </div>',
);

      

+3


source to share


1 answer


Comment fields have no placeholders by default.

Using the code posted in your question, it would be easy to add these to:



<input type="text" id="comment_name" name="author" placeholder=" . __( 'Name',  kopa_get_domain() ) . '" class="valid">

...

<input type="text" id="comment_email" name="email" placeholder="' . __( 'Email',  kopa_get_domain() ) . '" class="valid">

...

<input type="text" name="url" class="valid" placeholder="' . __( 'Website',  kopa_get_domain() ) . '" id="comment_url">

      

Your inbox should also have an email view.

+1


source







All Articles