Hello, I'm Chris Murphy — I specialize in creating engaging, user-centric interactive experiences.

How To Quote Comments In A WordPress Comment List

Sometimes it's the little details that make WordPress themes really shine, other times it's the little features you can add that make working with a WordPress theme a nice experience for readers.

I received an email from a reader this afternoon, asking about one of the commenting features that I built into the Lemon Twist theme: quote comments.

Hi Chris,

I’m really curious on how you got that quote feature on your comment section. Do you mind sharing your code?

Cheers,
[author name omitted]

While this is not a new feature by and large, it is one that I thought would bring a sense of discussion to the linear WordPress comment format much like how forums work. I’ve attempted to use threaded commenting plugins, but they are ugly and overly complicated for something that should be fairly straight forward.

In any case, this is the JavaScript snippet that I wrote (you need jQuery, but comes with the theme)

// attach a function to the quote comment link
  $('a.quote-comment').click( function() {
      var tb = $('#comment');
      var strQuote = $(this).attr('title');
      // assign the value
      tb.val('<blockquote>' + strQuote + '</blockquote>');
      return false;
   });

This is the result:

quote

There are a couple caveats to this feature

  1. You can only quote one comment at a time, as I didn’t build in concatenation.
  2. It is not parameterized so you’ll have to customize it for your own theme.
  3. Requires some additional styling (no big deal).

If anyone wants to improve on this, feel free to share!

farfromfearless

Comments on This Post:

  1. Michael
    Date: August 29, 2008
    Time: 7:50 pm

    Great stuff Chris, really appreciate your help.

  2. adie
    Date: August 31, 2008
    Time: 9:59 am

    Hi Chris, actually i drop by here for your great twilight saga theme, thanks! that was a great job. But when i walked around found this useful tips, once again, thanks!

  3. Josh Budde
    Date: October 19, 2008
    Time: 8:28 am

    Nice! I’ve been looking for something like this for awhile.

  4. ??????????
    Date: December 23, 2008
    Time: 4:31 pm

    ??? ??????? ??????, ??? ??? ?????? ?? ?? ???????? ????? ????? ??????. ?? ?????? ?? ?????? ?? ?????????????????? ???????????? ?????? ???? ?????????? ?? ?????? ?? ???? ?????? ??? ????? ???????? ??? ???, ??? ??????? ?????? ?????? ???????? ????????? ?? ???? ??? ?? ?? ?? ?????? ??????? ?? ??? ? ???????? ?????? ?? ?? ?????????? ??????????????? ?????? ??? ??, ??????????? ??????. ??? ???? ???????? ?????. ????? ? ???????? ???, ??? ????????????, ??? ?????? ??????? ?????????? 2001 ???? ????? ??? ?????????? ??? ??? ?????. ?????? ???????? ?? ??????????? ????? ???????????. ???, ??? ?? ???? ?????? ??????? ? ?????? ????? ??????. ?????? ? ?????? ????????? ??? ?????? ? ?????? ????? ??????. ??????????? ??????? ?? ???? ?????????? ????? ????? ????? ????? ???????? ????? ??????. ????????? ???????? ? ???? ??? ??? ????? ?????????? ????????? ?? ?????? ?. ??? ??????? ??? ???? ??????? ????, ??? ?????? ?????, ??? ????. ??????? ?? ???? ?????????? ????? ???????? ???????????? ? ???? ?. ? ??????????? ? ???? ??? ???? ???????????, ??? ????? ????? ? ??????? ???????? ?????. ?????? ? ?????? ??? ???????????? ?????? ??? ????? ??? ?????? ??????? ? ????????? ???? ????????? ?????? ?? ????????, ??? ????? ?????? ?????? ??????????? ?????? ??? ???????? ? ???? ??? ? ???????? ??????????? ?????? ??????.
    ????? ??? ???????? ????? ????????? ??????? ???? ???? ?????? ? ???????? ??????????? ? ??????????? ??????????. ? ????? ?????? ?????? ?? ??????? ??? ?????? ??????? ? ????????? ?. ???? ?????????? ??????? ? ??????? ??????. ???? ??? ???? ?????? ????? ?????????? ??? ???? ????? ??? ??? ???????? ????? ????? ????? ????? ? ? ??????? ?? ?????????? ?? ????? ??? ???????? ????? ????? ? ??????? ?????? ??? ??? ???? ???? ? ????? ??????? ????????? ????? ?????????.
    ? ????? ?? ????? ????? ?????????????? ??? ?? ??? ?? ? ???. ????? ??? ?????????????? ???? ???? ????????? ?????? ? ?????? ????????? ? ??? ?????????? ???????? ? ?????? ? ? ?? ????????? ?????? ??? ??? ?????? ??????. ?????? ?????????? ????????? ? ????? ?????????? ???????? ???? ?? ???????? ??????. ??? ???? ? ??? ??????????? ????? ????? ????? ? ??? ?? ??????? ??? ? ????? ??? ??????? ???? ? ????????????? ?????? ????? ?????? ?? ?? ??????? ?????? ???? ????????? ????? ?? ????? ?????????? ????.????????? ?? ??? ??? ???? ???????? ??? ????? ??????? ?????? ?????? ?? ?????, ????????? ???? ?????????. ????? ?????? ?????? ??? ????????? ????? ?? ????? ? ??? queen ?? ?????? ????? ??????????? ??????????. ??????? ?? ???? ? ??? ??? ? ???????????? ??????. ??? ?? ???? ??????????? ???. ? ??? ?????????? ?????? ??????? ?? ???????????????? ??????, ??? ????? ?????? ?, ??? ??? ??? ????? ?? ?????????? ??????????? ? ?????????? ????? ?, ????? ??? ???? ??, ??? ????? ??????? ?? ????.
    ???????? ? ???????????. ?????? ?? ???? ??? ?????? ????????? 2 ???? ??????? ????? ? ???????? ??? ?????????? ?????? ?????, ??? ??? ?????? ??? ????? ??? ?? ??????? ?????? ?????? ???? ????? ???? ??? ? ???????? ????????? ?????? ? ?? ???????? ????? ?????? ?? ? – ?????????????? ???????? 336% ? ???????. ??????? ????? ?????????? ???????? ? ??? ???? ????????? ???????????? ?????. ?????? ?????? ??? ??????????? ??? ?????? ???? ??????? ??????????? ???? ?????? ??????? ??????????? ???????????? ???? ??????? ????????? ??????? ???? ? ???? ???????? ??????? ?????? ???????? ????? ????? ?????? ????? ???????? ?????.
    ? ??????? ? ?????? ?????????, ????????? ???????? ???????????? ??????? ?????? ?????? ? ??????????? ?? ? ???????? ? ????. ?????? ???? ?????? ????? ?? ?????????????????? ?? ? ???? ?????????? ?? ?????? ????????? ? ???????? ?? ???? ??? ??? ??? ?? ????? ?????? ???????? ????????? ???????? – ?????????????? 336% ? ??? ?? ?? ??, ??? ?????? ????? ????????????? ? ???? ??????? ??? ?? ?????????? ??????????????? ?????? ????? ?? ??? ??????????. ?????? ????? ?????????? ? ?????? ? ?????????? ?? ? ?????? ? ???????????? ???????? ???? ?????? ??????????? ???? ???? ?????????? ? ??? ?????. ??? ????? ?????? ????? ??????? ??? ??????? ?????? ?? ?????????? 2001 ???? ???? ???? ???????? – ?????????????? 336% ??? ???????? ???????. ??????? ??????? ????, ??? ?????? ??????. ?? ????????, ??? ??? ????? ?????????? ???????????? ???? ???? ? ???????? ???? ??? ???????. ? ???? ??????????? ? ?? ?? ?? ??? ????? ??????? ??????? ???? ??????. ??????????? ??, ??? ?? ?????? ???? ?? ??? ?? ???????? ?????? ??? ??????????? ????? ?????? ?? ?????? ????? ?????????????? ???????? 336% – ?? ?, ???????? ????????? ???????, ????? ????. ??? ?????? ?? ? ? ??? ?????? ????????????? ???????????? ?????. ??? ??? ????????? ??????? ????????? ???????? ???? ?????. ??????? ???????? ? ???? ??? ?????? ???.
    ??? ????? ??? ???????????? ????? ? ?????? ??????? ??????? ????????? ? ????. ??? ????? ???????? ?????, ??? ???????????? ????? ?????????? ??????? ????????? ? ??????? ???? ??. ? ??????????? ? ?? ????? ??????????? ? ?????? ????? ??? ?? ?????? ??? ??? ??????? ????? ???????? ?????? ??????? ? ?? ? ????? ????. ?????? ?????? ??????? ???????? ???????? ?????? ?????? ??????????? ?????????? ?-? ?????? ??????? ?????? ???????? ??? ???????? ???? ? ??????? ???? ????? ?????? ?????? ??????????? ????? ??????? ???? ???????, ??????? ????????? ?????? ????? ?????. ??? ????? ???????? ????? ??? ?????????? ????????????.
    ?, ???? ????? ??? ????? ??????????? ????? ? ???? ???? ????????? ?????? ? ????????? ??? ????? ???? ????? ? ?????? ???? ??? ?????? ?????? ???? ? ????????? ???????? ? ?????. ?, ???? ? ????? ????????????? ????? ? ????? ??? ????? ?????? ??????? ? ????????? ???? ????????? ?? ? ???? ?? ? ???? ?????? ??????????? ??????? ????? ???? ?? ???????? ????????? ?-? ?????????? ????? ?????. ??? ???????????? ????? ?? ????????? ???????? ?, ??? ????? ????? ?????? ? ????????? ?? ?????? ????? ??? ??? ??????? ???????????. ?? ???? ??? ?????? ????? ?????????. ?? ???, ??? ???????? ??? ??? ???????? ?????? ????? ?????? ??? ???. ?-? ?????????? ????????? ?? ???????? ????? ???????, ???? ?????? ???? ??????? ??? ??? ?? ?? ???? ???????????????? ??? ???????? ?? ???? ??????. ?? ?????? ?????? ?????? ????? ???????? ??????? ? ???????????? ?. ?????? ?????? ?????? ? ???????????? ?????? ???????????? ?-? ?????????? ??????????? ??????????????? ????????? ?????? ???? ????? ?? ????? ????? ??????????? ????????, ??? ?????????? ? ????????? ????? ?????? ??? ???? ??????? ????????????? ???. ?, ???? ??????? ???????? ???????????? ?????? ???????????? ? ??? ????? ?????? ??????? ? ????????? ???????????? ???? ???? ?????????? ?-? ????????, ??? ????? ?????? ?????? ?????? ?????? ??? ???? ?? ??????? ????????? ?????? ?????????? ???? ?????.
    ?????? ???? ? ??? ?? ???? ?????? ?????? ??? ?? ???????? ????? ????????? ? ?? ????? ??????? ?? ? ??????? ?????? ??????? ????? ? ??????????? ???????? ???? ????? ??????? ? ???????? ????????? ?? ???????? ??? ??? ???????? ???????? ??????? ?????? ? ????? ????? ???????. ??????? ?? ????????: ??????? ??? ??????? ????? ????? ??? ????? ?????????? ? ??? ????. ??? ?????????? ???? ? ????? ???????? ??? ????? ? ??? ???????.
    ???? ??? ?????????? ????????? ?? ?????????????????? ????? ???????? ?? ?, ????????? ?? ?? ???? ? ????? ????? ???????? ??? ??? ??? ?????? ??????? ????????? ????? ????? ????? ? ???? ????????? ????? ??????????? ?? ?????????? ?? ??? ????? ???????? ????? ????? ?? ?????????? ??????????????? ?????? ????????: ??? ??????? ??????? ???? ????. ?????????? ????????? ?? ??????????? ?????? ??????? ???????? ??????????? ?????????? ?????????????. ? ?? ??????? ????????? ????? ????? ????? ????? ????? ?? ?????? ????? ???????. ? ??? ????? ? ? ????????????, ???? ?????? ????? ?????. ??????? ?? ?????????? ????????????? ????? ????????? ??????? ???????? ?, ??????? ??????? ? ??????????. ??????? ????????: ??? ??????? ???? ?? ??? ?? ???? ???? ?????? ?????? ??? ??? ??? ?????? ???????? ????????? ?????? ??? ??????? ?? ?? ??????? ?? ?????, ??? ?????? ?????? ?????????? ??????????? ?????? ????? ???? ??? ?? ???????, ??????? ?? ???? ? ???????. ????? ?? ?????????? ? ?????? ??????, ???????? ????? ??????. ??????? ????? ?????????? ?????? ?????? ?????????. ????????: ??? ??????? ??????? ??????????? ? ???? ???? ??? ? ??? ????? ?? ?????? ????? ????? ?????? ???????????? ? ???????? ???? ?????? ???????? ???? ????? ??????? ????, ??? ???????? ????? ??????????? ? ??? ????? ? ???????????. ??????? ???????????? ???? ????? ?? ?? ??????? ????. ? ??????? ??? ???? ? ????????, ??? ?????? ???????? ??? ??? ??? ???? ??? ??? ????????: ??????? ??????? ??? ????? ??.
    ?????????? ?? ???????? ???????? ????????? ??? ? ????????? ????? ????? ????? ?????? ????????. ????? ? ? ?????? ??? ?????? ??????????? ??????????? ????????????. ???? ?????? ? ????? ?????? ???????? ????? ?? ? ????? ?????????? ? ?? ???? ???????? ?? ?????????? ????????? ? ??????? ????? ?????????? ?? ?? ??????? ????? ?? ???????. ????????????? ??????? ?????? ????? ??????????? ????? ??????? ?????????.
    ??????? ? ??? ??????????? ??? ?????? ???????????? ???? ??????? ?????? ?????? ??????? ?? ?? ???? ????? ? ??????? ?? ????? ? ??????? ???????????? ?????? ?????? ?????? ?????????? ?????? ?????? ? ????? ???????? ???????? ???????? ? ? ?????. ??? ???????? ??????? ? ??????? ???? ?? ?? ???? ????? ??????????? ????? ????????????? ??????? ?? ?? ????? ??????? ?? ???? ?? ???? ?????????? ?????????? ?????? ?? ??????? ????? ??? ??? ? ? ?????? ?? ?? ??????????? ? ????? ? ???????????? ?? ?????? ???????? ??? ?????? ????? ? ?? ?????. ????? ??????? ??? ? ???????? ?? ???????? ??????????? ???????????? ????? ??? ??. ???????? ????? ? ??? ?????? ???? ?? ??????? ????????????? ????? ??? ??????? ??????? ??? ?? ???????? ?????????? ??????? ?? ???????? ????? ?? ?????????? ????? ? ?? ??????? ????????? ????? ????? ????? ???????? ????????? ??????????? ? ????????????? ????????? ???????? ???????? ?? ??????? ? ????? ??? ??? ???? ? ??????????????? ????????????. ?????? ???????????? ???? ???. ?? ? ?????? ???????? ???????? ?? ?????????? ???????? ???????? ??? ? ????? ????????????? ??????? ????????. ?? ??? ?????? ????????? ?????? ?????? ????????. ? ??????? ?????? ????? ??????? ?? ? ???????? ? ??? ??? ?????? ?? ??????????? ?? ???? ??? ???? ?????. ?????? ???? ????? ?? ?? ??? ??? ???. ????????????? ??????? ? ??? ???????? ????? ???????? ??? ??? ?? ???? ?? ????? ??????? ???????? ???????????? ?????????? ??? ????????. ? ???? ? ???? ????? ????? 5 ??????????? ????? ???? ?????? ?? ?????? ??????? ????? ??? ??? ??????? ? ? ????????????? ??????? ? ???.

  5. justme
    Date: January 12, 2009
    Time: 2:38 am

    Nice! I’ve been looking for something like this for awhile.

    just testing

    These tags works on any wordpress blog?

  6. Chris Murphy
    Date: January 12, 2009
    Time: 8:43 pm

    justme — the script is quite specific for this site, but you can modify it to work with your blog.

  7. Tod
    Date: August 16, 2009
    Time: 8:32 am

    Thanks. Your post helped me to make quote comments in one of my blogs.

  8. sooran
    Date: September 15, 2009
    Time: 4:42 am

    Tanck
    Very GooD

Add a Comment:

Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs are automatically generated. Off-topic or inappropriate comments will be edited or deleted. Email addresses will never be published. Keep it PG-13 people!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

All fields marked with "*" are required.