Last active
May 6, 2018 21:54
-
-
Save anatol06/ed1ec274b5f5a5c95f403ec2655b18fb to your computer and use it in GitHub Desktop.
WP - Comments Args and Form
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 | |
$args = array( | |
'walker' => null, | |
'max_depth' => '', | |
'style' => 'ul', | |
'callback' => null, | |
'end-callback' => null, | |
'type' => 'all', | |
'reply_text' => 'Reply', | |
'page' => '', | |
'per_page' => '', | |
'avatar_size' => 80, | |
'reverse_top_level' => null, | |
'reverse_children' => '', | |
'format' => 'html5', // or 'xhtml' if no 'HTML5' theme support | |
'short_ping' => false, // @since 3.6 | |
'echo' => true // boolean, default is true | |
); ?> | |
<?php wp_list_comments($args, $comments); ?> | |
<?php | |
$comments_args = array( | |
// change the title of send button | |
'label_submit'=>'Send', | |
// change the title of the reply section | |
'title_reply'=>'Write a Reply or Comment', | |
// remove "Text or HTML to be displayed after the set of comment fields" | |
'comment_notes_after' => '', | |
// redefine your own textarea (the comment body) | |
'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><br /><textarea id="comment" name="comment" aria-required="true"></textarea></p>', | |
); | |
comment_form($comments_args); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment