How to create a classified section in place of comments_template

It will be a three step process. You can use comment_form_logged_in_after (for logged in users) and/or comment_form_after_fields (for non-logged in users) actions to add your custom fields. Save the values as comment meta using update_comment_meta function hooked into comment_post action. Get the values using get_comment_meta. EDIT: 25-05-2022 Try this.. /* * This will add the … Read more

How to filter comments by comment_meta

I needed to use new WP_Comment_Query and set my $args to show only this post, with the meta attached. Hope this helps someone! <?php comment_form(); if (have_comments()) : ?> <div class=”container”> <div class=”btn-group flex”> <button type=”button” onclick=”window.location.href=”https://wordpress.stackexchange.com/questions/406158/<?php echo the_permalink();?>/?cmeta=ALL””>SHOW ALL</button> <button type=”button” onclick=”window.location.href=”<?php echo the_permalink();?>/?cmeta=BUY””>BUY</button> <button type=”button” onclick=”window.location.href=”<?php echo the_permalink();?>/?cmeta=SELL””>SELL</button> <button type=”button” onclick=”window.location.href=”<?php echo the_permalink();?>/?cmeta=TRADE””>TRADE</button> … Read more

Fix threaded comments

You don’t have the comment reply Javascript being enqueued. Add this to your header, just before the wp_head() call: if ( is_singular() && get_option( ‘thread_comments’ ) ) wp_enqueue_script( ‘comment-reply’ );

How to add extra field in admin comment section

You can add it directly through your functions.php, unfortunately this is not documented very well at all. You want to hook into add_comment_meta using add_action, to look at this further refer to line 500-ish of comment.php. It looks like this function add_comment_meta($comment_id, $meta_key, $meta_value, $unique = false) { return add_metadata(‘comment’, $comment_id, $meta_key, $meta_value, $unique); }

How translate it? Intensedebate

Check out the code for the IntenseDebate comments system and make sure where the Comments variable is initiated it looks like this __(“Comments”, “your-theme”), A double under-score denotes it to be translated. “Comments” is the interface element and “your-theme” is the theme translation initiator that should be in you functions.php theme file // Make theme … Read more

wp-comment-post.php and header already sent issues

Okay, just looking through this code quickly, it looks like the problem may be that the getImgID() function is echoing rather than returning its output. This function is called from within another function, guan_getImgID_inserter(), that is hooked into the comment_text filter hook. Anything that filters comment_text (or any filter hook, for that matter), should be … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)