Created
June 1, 2021 06:21
-
-
Save nawawi/1bd1aa205320edec29369b46401c286f to your computer and use it in GitHub Desktop.
WordPress Comment Website Field required
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'comment_form_defaults', function($defaults) { | |
| $defaults[ 'fields' ][ 'url' ] = '<p class="comment-form-url"><label for="url">Website <span class="required">*</span></label> <input id="url" name="url" type="text" value="" size="30" maxlength="200" required="required" /></p>';\ | |
| return $defaults; | |
| }, PHP_INT_MAX); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment