comments in Admin

The comments section is quite a big section to properly explain, but here are the basics First, here is the “Settings >> Discussion screen It is here that you set how and when comments will be displayed on the front end on posts. Here is a quick description of the most important setting Allow people … Read more

How should I get the original comment while processing the reply

The comment/reply ID is a value actually sent by the form. You are able to retrieve it via $_GET: // Default is “no reply” eq. 0 $id = 0; // Handle replies if ( isset( $_GET[‘replytocom’] ) ) { $id = filter_var( $_GET[‘replytocom’], FILTER_VALIDATE_INT, # or: # FILTER_SANITIZE_NUMBER_INT array( ‘options’ => array( ‘min_range’ => 1, … Read more

Which filter/hook to use for styling comments?

the comments_form function that outputs the contact form has two actions that could be used to accomplish what you want. add_action( ‘comment_form_before’, ‘wwm_comment_form_before’ ); function wwm_comment_form_before() { //output your opening html here } add_action( ‘comment_form_after’, ‘wwm_comment_form_after’ ); function wwm_comment_form_after() { //output your closing html here } and that’s a wrap 🙂

How to get comment id in callback function?

The callback is already passed arguments but crazily the codex doesn’t document them. However it does give you an example and the first two lines are: function mytheme_comment($comment, $args, $depth) { $GLOBALS[‘comment’] = $comment; which matches the equivalent functions in the bundled styles. Once you’ve set the comment object passed as the global as in … Read more

how get comments only on post of current logged in user?

Using the @shanebp ideas of using get_comments: $args = array( ‘post_author’ => get_current_user_id(), // It will use the current logged in use to grab the comments ); $comments = get_comments( $args ); // Referer to http://codex.wordpress.org/Function_Reference/wp_list_comments $list_args = array( ‘reverse_top_level’ => false // Show the latest comments at the top of the list ); wp_list_comments( … Read more