• Resolved Luke

    (@lukejanicke)


    Can anyone point me to any good (and by that I mean slightly “For Dummies”) guides on using a walker class for comments?

    I just started writing a callback function to customize wp_list_comments() and I checked the codex where I noticed this…

    ‘walker’
    ( Walker object ) Provide a custom Walker class object to use when rendering the comments. This is the primary method of customizing comment HTML.

    Really? The primary method of customizing comment HTML. The Internet doesn’t agree. Mostly.

    Anyone point me to a good introduction and example?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Probably should say primary method of customizing comment organization. If you wanted to thread by commenter instead of parent, you would change the walker. Most people are only interested in the actual comment HTML from the callback, so the default walker is just fine.

    Since the walker calls the callback, in a sense it is the primary method. It’s just that we are mostly concerned with only the callback portion. It’s still part of the walker by inheritance.

    I can’t offer any good references, I’m hoping a little explanation here might help you understand what the Codex is trying to say.

    Thread Starter Luke

    (@lukejanicke)

    That makes more sense. Thanks. Based on that I was happy to stick with customization via arguments/filters.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Walker class for comments’ is closed to new replies.