• When a new comment is submitted the unapproved comment with “Your comment is awaiting moderation.” does not appear when per_page option is set to a number higher than the number of existing comments – 1.

    I display the comments with:

    wp_list_comments(
    	array(
    		'avatar_size' => 0,
    		'walker'	=> new Walker_Comment_custom(),
    		'reverse_top_level' => true,
    		'page'      => 1,
    		'per_page'  => 5
    	)
    );

    Here the chronological order of the comments is reversed, and a max of 5 comments is returned with per_page = 5.

    When a new comment is posted, and there are more than 5 existing comments, the new comment with waiting for approval message does not appear. Just the most recent 5 approved comments appear.

    If per_page is increased to 1 comment more than the comment count, the comment waiting for moderation appears.

    I am expecting the most recent unapproved comment to be displayed first.

    Is this a bug or a limitation?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Curious, does it work right if you remove the custom walker?

    Thread Starter webdevbytes

    (@webdevbytes)

    Same deal without the custom walker. As soon as there are 5 or more comments, the user’s comment does not appear. I think this has to do with the fact the results a being displayed in reverse with order reverse_top_level.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“Your comment is awaiting moderation.” message not working as expected with reve’ is closed to new replies.