Tag Info

Hot answers tagged

5

You shouldn't copy that file, precisely because it is too bulky. About half of it is implementation of submission form, which was entirely replaced with comment_form() function around that time. So the answer why was it deprecated is roughly: Newer code is more compact Markup belongs in theme For better and more relevant comments.php example look at ...


3

From WordPress Version 4.1 (trac ticket #20446) it's now added to pass your own class as an argument of comment_form($args) using 'class_submit' array key: $args = array( 'class_submit' => 'btn btn-default' ); No need to do extra hard work. (Edited the Codex too) :)


2

This is possible using the comment_post action, and the GFAPI class which handles entries in WordPress. What you need to first is add using comment_form_default_fields a field which is a checkbox. function add_to_email_list_field($fields) { $fields['add-to-email'] = '<p class="comment-form-public"> <input id="addtoemail" ...


2

Open comments.php file inside your theme's folder <?php if ( comments_open() ) : ?> <?php $fields = array( 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name', 'responsive' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '<input id="author" ...


2

After checking out the code, the best way to do this would be to use the wp_editor_settings filter in /wp-includes/class-wp-editor.php. When you call wp_editor() it internally makes a call to _WP_Editors::editor($content, $editor_id, $settings);. This function first passes the $settings array through parse_settings() which uses that filter. add_filter( ...


2

parent : Comments can be replies to other comments. Every comment has an ID number. When the comment is a reply, then it will have a "parent" which is the ID of the comment it is replying to. Putting a comment ID in here will get all the replies to that comment. post_parent : Posts can be children of other posts as well. This is how things like hierarchical ...


1

Easiest way to handle hiding the display is to use css. Your "reply to" form is probably displayed inside of a comment div or has some class identifying it as a comment reply. You still might need to handle the check on the server side to make the rating field to be not required when a comment has a parent comment.


1

You can use filters in custom functions to modify the default output of the comments form via your child themes functions file. Modify the comment form "Leave a reply" text. add_filter( 'comment_form_defaults', 'wpsites_modify_comment_form_title' ); function wpsites_modify_comment_form_title( $defaults ) { $defaults['title_reply'] = __( 'Leave a Comment' ...


1

Emails are sent to site admin(settings->general E-mail Address) when you check the email me option . No need to worry if you un-check that assuming you are not using any plugins that overrides.


1

You'd probably have to do this in javascript, but I'm guessing the reason you want to add a class is to style it differently? If so, just use different styles for #respond that is inside a reply container. So perhaps the style would be .comment-replies > #respond or something similar.


1

Actually this is what you need to use. <?php echo get_comment_meta( $comment->comment_ID, 'rating', $rating ); ?> IDs are already stored in $comment array.


1

Your translated code seems to work fine. I tried putting it in comments.php of said theme, and the comments are appearing (at least when displaying single post). Try disabling plugins and check if you have accidentally deleted the call to comments_template(). That being said this is really not the way you should be translating WordPress theme. There are a ...


1

You can not enable comments in future posts. Those posts are not public and are not private, so they verify the conditional in line 61 of wp-comments-post.php file; that conditional is (WP 4.1.1): } elseif ( ! $status_obj->public && ! $status_obj->private ) { /** * Fires when a comment is attempted on a post in draft mode. * ...


1

If you have something like _e('') just change it to something like _e('','a4jp') In this example, a4jp is the theme name (theme-slug).



Only top voted, non community-wiki answers of a minimum length are eligible