Disallow Comments
Go to Settings – Discussion from the left sidebar of your WordPress admin panel. On this page, uncheck the option that says “Allow people to post comments on new articles” and then click on the Save Changes.
Go to Settings – Discussion from the left sidebar of your WordPress admin panel. On this page, uncheck the option that says “Allow people to post comments on new articles” and then click on the Save Changes.
Your code uses this: number_format((float)$results[$i][‘avg_rate’], 2, ‘.’, ”) And if we look at where $i is set, we see this just before the loop: $i=0; and this: $i++; But I don’t see how this maps in any way to the current post when there’s a conditional, meaning that not everything in the results array is … Read more
you can paste the code below in your theme functions.php file, it should generate almost the same comment form for logged in and logged out users add_filter( “comment_form_fields”, function( $comment_fields ) { if( is_user_logged_in() ) { // Get an array of field names, excluding the textarea $comment_field_keys = array_diff( array_keys( $comment_fields ), array( ‘comment’ ) … Read more
No comment Section but still got a Comment
thank you for WebElain to help me. This answer driving me to the right request. Now it’s ok. It is an object indead and I use something more simple with get_comments () query with parameter count enabled. the final code is like this : #!/usr/bin/php <?php if ( ! defined(‘ABSPATH’) ) { /** Set up … Read more
Create another comment section for WordPress
How do I add custom field to Admin comment form and display
It’s easy, you can just use different hook to perform same action. add_action( ‘comment_approved_’, ‘update_post_time’, 99, 2); // this will fire when comment is approved regardless of comment type Last underscore in action name is important comment_approved_ as normally after it goes comment-type if you need to hook to approval to specific comment types. See … Read more
Comment area visible but comments not being saved
I am also interested and after spending hours to test, read source code and some online docs. Finally understand how it is working. And end up the method is easy but not obvious. Not sure how you add the image, you may modify the code to meet your actual situation and here is the WordPress … Read more