• In my blog, i answer comments inline by editing them to add “admin says: blah blah”. i do this so i won’t bump up the comment count with all my admin comments.

    is there any way i could add a widget to my sidebar which would display the latest comments i’ve replied to? (which means, edited to add my answer at the bottom). i know that there’s a widget that displays just the latest comments by the publish date, but i’d like to display comments by the edit date (even if i just replied to a bunch of comments from 3 years ago).

    can anyone think of a way to do this? this might involve adding a new checkbox somewhere in the ‘edit comment’ page, and ticking it every time…

    thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think you will have to write a custom snippet for this. You can use the function get_comments which takes an order by parameter.

    Thread Starter smoothyjones

    (@smoothyjones)

    hmmm… none of the get_comments() parameters refer to what i need (date last edited). is it even possible to add my own custom parameter to a comment (be it “date last edited”, or for example, “number of cats mentioned”)? and if so, in which php file should i do it?

    Hi smoothyjones,
    You can add meta data to a comment, as described here: add_comment_meta.

    Then you can write a custom function which uses get_comments and orders the comments by the meta value.

    Since this changes the site’s functionality it belongs to a standalone plugin. You can create a single .php file in /wp-content/plugins, add the plugin’s header and your code underneath.

    I hope this helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘displaying latest modified comments’ is closed to new replies.