wp-editor-area textarea disapear on cancel-comment-reply-link click
wp-editor-area textarea disapear on cancel-comment-reply-link click
wp-editor-area textarea disapear on cancel-comment-reply-link click
All you need is to simply check if the entered name or email matched any admin accounts before the comment is saved. function restrict_admin_names() { if ( !is_user_logged_in() ) { $name = $_POST[‘author’]; // Get Submitted Name $email = $_POST[’email’]; // Get Submitted Email $admins = get_super_admins(); // Get an array of admin login $adminemail[] … Read more
WordPress, by default don’t enable comments on custom post types, and once you have added support for comments, you still get the following message: Comments are closed You have to basically manually visit each custom post and enable comments in the post editor screen. There are however a workaround to enable comments by default in … Read more
The answer is that you can’t do it without using comments.php. Since WordPress 2.7, comments.php is important to display full features and customizable comments rest if you still want to use <?php comments_template(); ?> then you can edit anything in it except CSS.
How to change comment-page-1#comment-25 to any string?
You can modify a lot of form behavior by passing $args to the comment_form() function – have you tried that? Alternatively, you can write a custom comments template file and then use the comments_template() call to display it within the theme. This method would allow you to have complete control of the type, class, and … Read more
Comments template only linking to one post
You are missing 2 parameters in your function report_spam. Also the priority should not be 1. Try the code below. add_action(‘transition_comment_status’, ‘report_spam’, 10, 3); function report_spam($new_status, $old_status, $comment){ if($new_status == ‘spam’){ var_dump($comment->comment_author_IP); die; } } I’ve set die so that you can check and manipulate what you want.
Finally I found a way and I am posting it here to address any further requests for such a workaround. You may add a customized version of comment_form_title function to your theme’s functions.php file and call it in your theme’s comments.php file. function my_comment_form_title( $linktoparent = true ){ global $comment; $noreplytext = __( ‘Leave a … Read more
There is no comment_ID until you are in the foreach loop. Try: $comments = get_comments($args); foreach($comments as $comment) : echo ‘<div id=”‘ . $comment->comment_ID . ‘”>Agent Name ‘ . $comment->comment_author . ‘Phone’ . $comment->comment_phone . ‘Reply’ . $comment->comment_content . ‘</div>’; echo get_comment_meta( $comment->comment_ID, ‘agents_condition’, true ); endforeach;