Tag Info

Hot answers tagged

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" ...


1

You are stomping on the global wordpress posts with your plugin. Doing your wp_query call and then calling $recent_articles_wtb->the_post(); means that later (after your loop), you will want to call wp_reset_postdata(); # Thanks Milo That should reset the global $current_post and $post objects.


1

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) :)


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

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

I found a solution to add rel="nofollow" to comments. My theme maker gave me this hack that you can add in functions.php (no guarantee it will work for everyone, might depend on your theme): function add_nofollow_to_comments_popup_link() { return ' rel="nofollow" '; } add_filter( 'comments_popup_link_attributes', 'add_nofollow_to_comments_popup_link' ); ...



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