Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aalimran07/8e6d45d1742af4d1406607d1846ed3c4 to your computer and use it in GitHub Desktop.
Save aalimran07/8e6d45d1742af4d1406607d1846ed3c4 to your computer and use it in GitHub Desktop.
<?php
add_filter('comment_form_default_fields', 'industryall_comment_form');
function industryall_comment_form($industryall_fields)
{
$industryall_fields['author'] = '<div class="col-sm-4">
<div class="form-group">
<label for="name-cmt">'.esc_html__('Name', 'industryall').' <span>*</span></label>
<input type="text" class="form-control" name="author" id="name-cmt" placeholder="">
</div>
</div>';
$industryall_fields['email'] = ' <div class="col-sm-4">
<div class="form-group">
<label for="email-cmt">'.esc_html__('Email', 'industryall').' <span>*</span></label>
<input type="email" class="form-control" name="email" id="email-cmt" placeholder="">
</div>
</div>';
$industryall_fields['url'] = '<div class="col-sm-4">
<div class="form-group">
<label for="website">'.esc_html__('Website', 'industryall').'</label>
<input type="text" class="form-control" name="url" id="website" placeholder="">
</div>
</div>';
return $industryall_fields;
}
add_filter('comment_form_defaults', 'industiral_comment_default_form');
function industiral_comment_default_form($default_form)
{
$default_form['comment_field'] = '<div class="row"><div class="col-sm-12">
<div class="form-group comment-message">
<label>'.esc_html__('Your Comment', 'industryall').'</label>
<textarea class="form-control" name="comment" rows="3" placeholder=""></textarea>
</div>
</div>';
$default_form['submit_button'] = '</div> <button type="submit" class="btn btn-default">'.esc_html__('Post Comment', 'industryall').'</button>';
$default_form['comment_notes_before'] = '';
$default_form['title_reply'] = esc_html__('Leave A Commment', 'industryall');
$default_form['title_reply_before'] = '<h6 class="comments-heading">';
$default_form['title_reply_after'] = '</h6>';
return $default_form;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment