Tag Info

New answers tagged

0

This should do the trick, I guess: $args = array( 'number' => 10, 'order' => 'DESC', 'status' => 'approve', 'parent' => 0 ); $comments = get_comments( $args ); You can find full list of arguments in Codex.


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


0

As @SaurabhShukla mentioned in one of the comments, the problem was probably the theme. I use Virtue. Its great and got tons of options, and in one of them, under misc settings (a place which is totally unlooked-for), sits an option/out button. Hope this will help someone else in the future. Thank you all for trying to solve my problem. ...


0

<?php $comments_query = new WP_Comment_Query; /** * the code inside the post loop * start */ $args = array( 'author__in' => get_the_author(), 'status' => 'approved', 'number' => 1, 'post_id' => get_the_ID(), 'orderby' => '', 'order' => 'DESC', ); ...


-2

Settings > Discussion ... Various settings there, in particular tick: "Allow people to post comments on new articles"


0

First, you have a blog on WordPress.com, so you can't change any code to make this happen. To start with, is all of the "background" above correct? Yes. Is there a way to enable the reply buttons on all levels of comments? No, not on WordPress.com. If you self host a site, there are ways to do this. If not, is there a known reason for the ...


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


0

Thanks to the theme developers for helping me fixing it. I'm posting the answer here in hope that it may helpes any person facing the same problem. In functions.php there was a code to disable comments on page.php Remove this part of code from functions.php to make the comments working on pages too: function default_comments_off( $data ) { if( ...


0

Just because this method is so out dated, here's a modern solution. In the wp-admin under Posts when you see the list of all your posts, check the box next to Title so that all your posts are selected. Then choose the bulk option Edit. From here you can change all your comments to Allow in the select box. Then click update. This now allowed comments on ...


0

If you take a look in source the condition for this message is get_option('require_name_email'). You can control it in Settings > Discussion > Comment author must fill out name and e-mail. The programmatic way could be add_filter( 'pre_option_require_name_email', '__return_null' );


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.


0

You are missing a "NOT" logical operator (!) in your if statement. You want to say "if comment author IS NOT empty". As of now, the function is reading that the author is not empty and defaulting to your else statement that tells it to output the author's full name. Use the second block of code but make the following change. Change the following: if ( ...


0

If you go to http://gravatar.com/d6b10d5767d1e29006c11e1a2c590f3c (omit the /avatar/ from path) you get http://gravatar.com/clojita which seems to be your gravatar account, correct? MD5 collision is unlikely (but maybe it's time to buy a lottery ticket :) Look at source fetches interesting detail — the comment in question has comment-author-clark class. So ...


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


0

I am using Disqus and can anwser for this platform : 1) You have the option to save comments both on Disqus and locally on WordPress. 2) This way, if you want to switch to default comments, they will already be there. On the other side, you cal also import local comments to Disqus, if you were using the default comment system and want to switch to Disqus. ...


0

It looks like there are a number of plugins that can accomplish this: http://peadig.com/wordpress-plugins/facebook-comments/ http://aaroncollegeman.com/facebook-comments-for-wordpress/ Naturally, I can't really vouch for these plugins working well, but that is the case with any plugin. Make sure to take backups first and good luck!


0

If you are using wp_list_comment with a custom callback, ie: <?php wp_list_comments(array('callback' => 'my_wp_list_comment')); ?> Then make sure that you pass the right depth parameters when calling comment_reply_link inside that callback, just like this: <?php function my_wp_list_comment( $comment, $args, $depth ) { // ...blah ...



Top 50 recent answers are included