Comment form not supported the image tags

Hi please use below code in your functions.php to allow img tag in comments. For details please follow link wp_kses_allowed_html and for more details please follow trac link add_filter( ‘wp_kses_allowed_html’, array( $this, ‘my_kses_allowed_html_hook’ ), 20, 2 ); function my_kses_allowed_html_hook( $tags, $context = null ){ if ( ‘post’ == $context && ! isset( $tags[‘img’] ) ) … Read more

How to echo PHP after comment form submit?

Native comment form is not posting to the page itself, but away to a special wp-comment-post.php endpoint. That endpoint processes the form submission, then redirects back to the page (which rebuilds with submitted comment if necessary). If you want to echo data at the page at the end of this process you would need to … Read more

How to edit comments form on posts?

Check your theme, if it uses template, create a child theme and edit it. If it’s not a part of comment template, edit another part. You can try to find correct place with PsPad, Visual Code Studio or whatever else code editor while typing the phrase and searching in the template/plugin files. If you need … Read more

How do I write this code to not show default on label_submit?

I researched the WordPress Codex some more and analyzed the code I posted here and if you look at the top where it says $form_args, but then in comment_form($forms_args): <?php $form_args = array( ‘label_submit’ => ‘Send’, ‘title_reply’ => ‘Write a Reply or Comment’, ‘comment_notes_after’ => ”, ‘comment_field’ => ‘<p class=”comment-form-comment”><label for=”comment”>’._x(‘Comment’,’noun’).'</label><br /><textarea id=”comment” name=”comment” cols=”45″ … Read more

Cannot display comment in page

I am not sure where you are using the function wp_list_comments but you should use it in the theme comments.php template file and call it using comments_template function. If you want to display comments anywhere else then you can use function get_comments

Can not edit comment form

You can put this code in your current theme function.php file More Info <?php add_action( ‘comment_form_logged_in_after’, ‘additional_fields’ ); add_action( ‘comment_form_after_fields’, ‘additional_fields’ ); function additional_fields () { echo ‘<p class=”comment-form-title”>’. ‘<label for=”title”>’ . __( ‘Comment Title’ ) . ‘</label>’. ‘<input id=”title” name=”title” type=”text” size=”30″ tabindex=”5″ /></p>’; } ?> EDIT: $comments_args = array( ‘comment_notes_after’ => ‘<p><label for=”comment”>’ … Read more

Modify “Must be logged in to comment” text/links?

The text, “You must be logged in to post a comment.” comes from this line in WordPress: https://github.com/WordPress/WordPress/blob/efaf4a8938bbeb8510c8e1e4cc6fe84a434c17c3/wp-includes/comment-template.php#L2449 Whenever you see something wrapped in the double underscore function __( ), it means it’s a translatable string. You can use a function like this and add it to your themes functions.php file: add_filter(‘gettext’, ‘change_comment_logged_in_notice’, 20, 3); … Read more