Removing website URL in comments causes misalignment of submit button and tickbox
Removing website URL in comments causes misalignment of submit button and tickbox
Removing website URL in comments causes misalignment of submit button and tickbox
On most cases you should be able to use the_title filter to modify the title string. Use get_comments_number() to get the comments count for the post – of given ID or the current one. For example, add_filter( ‘the_title’, ‘wpse_427277_the_title’, 10, 2 ); function wpse_427277_the_title( string $title, $post_id = null ): string { $comment_count = (int) … Read more
Of course, I found an answer right after posting this — the Asgaros plugin allows for this functionality! You just need to add a forum on a password-protected page, and then in the plugin settings, go to “Features” and toggle on “Allow guest postings”.
WooCommerce admin>edit-comments show none [closed]
Using the comments_pre_query filter, this seemed to work well in development and testing: /** * @param null $comment_data Return an array of comment data to short-circuit WP’s comment query. * @param WP_Comment_Query $query WP_Comment_Query instance, passed by reference. */ add_filter( ‘comments_pre_query’, static function ( $comment_data, $query ) { // Limit to admin area. if ( … Read more
Modifying core WordPress files, like class-walker-comment.php, is generally not recommended, as your changes will be overwritten with each WordPress update. Instead, you can achieve the same effect by using a child theme and custom functions. This way, your modifications remain intact across updates. I tried a few different things but I was able to get … Read more
To allow unregistered users to post embedded images from other sites in comments, you will need to modify wp comment handling to permit certain HTML tags for unregistered users. By default, wp sanitizes HTML input from unregistered users for security reasons. You need to modify the list of allowed HTML tags in comments for unregistered … Read more
Solved the issue. Thank you @birgire for giving me a hint. First I edited MySQL wp_comments table by changing comment_content rows «Type» from TEXT to MEDIUMTEXT and restarted MySQL. Then created filter in functions.php: add_filter( ‘wp_get_comment_fields_max_lengths’, ‘my_length’ ); function my_length ( $lengths ) { global $wpdb; $lengths = array( ‘comment_author’ => 245, ‘comment_author_email’ => 100, … Read more
After a lot of trial-and-error from other questions and sources, I discovered the allow_empty_comment filter. This simple filter allowed me to submit comments without filling in the actual “comment” box. add_filter( ‘allow_empty_comment’, ‘__return_true’ ); More info here
As you may have guessed WordPress deals differently with threaded comments. By default the comment reply link is generated by the get_comment_reply_link function and the comment form with the send-button by comment_form. If your theme supports threaded comments it adds the comment-reply script. This script moves around the comment form to the (threaded) comment that … Read more